From 342ba68745610b4bee23112ac56e0681d3e72067 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Wed, 6 Jul 2022 16:41:44 +0800 Subject: [PATCH] Remove DeviceProxy pointer in ClusterBase (#19673) * Remove DeviceProxy pointer in ClusterBase * Fix Darwin build. * Fix Darwin threading issue. * Generated files Co-authored-by: Boris Zbarsky --- .../tests/MTRTestClustersObjc-src.zapt | 7 +- .../tv-casting-common/src/CastingServer.cpp | 18 +- .../idl/generators/java/ChipClustersCpp.jinja | 7 +- .../DemoClusterClient-InvokeSubscribeImpl.cpp | 5 +- .../DemoClusterClient-InvokeSubscribeImpl.cpp | 5 +- .../MyClusterClient-InvokeSubscribeImpl.cpp | 5 +- .../jni/FirstClient-InvokeSubscribeImpl.cpp | 5 +- .../jni/SecondClient-InvokeSubscribeImpl.cpp | 5 +- .../jni/ThirdClient-InvokeSubscribeImpl.cpp | 5 +- .../MyClusterClient-InvokeSubscribeImpl.cpp | 5 +- src/app/app-platform/ContentAppPlatform.cpp | 4 +- .../ota-requestor/DefaultOTARequestor.cpp | 12 +- .../templates/app/CHIPClusters.zapt | 2 +- src/controller/BUILD.gn | 5 +- src/controller/CHIPCluster.cpp | 51 - src/controller/CHIPCluster.h | 60 +- src/controller/CHIPDeviceController.h | 3 +- src/controller/CommissioningWindowOpener.cpp | 10 +- src/darwin/Framework/CHIP/MTRCluster.h | 3 - src/darwin/Framework/CHIP/MTRCluster.mm | 21 +- .../Framework/CHIP/MTRCluster_internal.h | 6 +- .../CHIP/templates/MTRClustersObjc-src.zapt | 39 +- .../CHIP/templates/MTRClustersObjc.zapt | 7 + .../templates/MTRClustersObjc_internal.zapt | 4 +- .../CHIP/zap-generated/MTRClustersObjc.h | 448 ++ .../CHIP/zap-generated/MTRClustersObjc.mm | 7053 +++++++++++------ .../zap-generated/MTRClustersObjc_internal.h | 256 +- src/transport/SessionHolder.h | 4 +- .../zap-generated/CHIPClusters.h | 5 +- .../zap-generated/CHIPClusters.h | 5 +- .../bridge-app/zap-generated/CHIPClusters.h | 8 +- .../zap-generated/CHIPClusters.h | 9 +- .../zap-generated/CHIPClusters.h | 13 +- .../zap-generated/CHIPClusters.h | 13 +- .../zap-generated/CHIPClusters.h | 13 +- .../zap-generated/CHIPClusters.h | 13 +- .../zap-generated/CHIPClusters.h | 13 +- .../zap-generated/CHIPClusters.h | 17 +- .../zap-generated/CHIPClusters.h | 9 +- .../zap-generated/CHIPClusters.h | 13 +- .../zap-generated/CHIPClusters.h | 9 +- .../zap-generated/CHIPClusters.h | 13 +- .../zap-generated/CHIPClusters.h | 27 +- .../zap-generated/CHIPClusters.h | 9 +- .../zap-generated/CHIPClusters.h | 272 +- .../cluster/MTRTestClustersObjc.mm | 2026 ++--- .../zap-generated/CHIPClusters.h | 21 +- .../lighting-app/zap-generated/CHIPClusters.h | 5 +- .../lock-app/zap-generated/CHIPClusters.h | 5 +- .../zap-generated/CHIPClusters.h | 4 +- .../zap-generated/CHIPClusters.h | 4 +- .../zap-generated/CHIPClusters.h | 5 +- .../app1/zap-generated/CHIPClusters.h | 52 +- .../app2/zap-generated/CHIPClusters.h | 52 +- .../pump-app/zap-generated/CHIPClusters.h | 9 +- .../zap-generated/CHIPClusters.h | 27 +- .../thermostat/zap-generated/CHIPClusters.h | 4 +- .../tv-app/zap-generated/CHIPClusters.h | 17 +- .../zap-generated/CHIPClusters.h | 52 +- .../window-app/zap-generated/CHIPClusters.h | 5 +- 60 files changed, 6814 insertions(+), 3990 deletions(-) delete mode 100644 src/controller/CHIPCluster.cpp diff --git a/examples/darwin-framework-tool/templates/tests/MTRTestClustersObjc-src.zapt b/examples/darwin-framework-tool/templates/tests/MTRTestClustersObjc-src.zapt index 48b11d1840ce20..bd3ec81e32920d 100644 --- a/examples/darwin-framework-tool/templates/tests/MTRTestClustersObjc-src.zapt +++ b/examples/darwin-framework-tool/templates/tests/MTRTestClustersObjc-src.zapt @@ -26,12 +26,13 @@ using namespace chip::app::Clusters; {{#chip_client_clusters includeAll=true}} @interface MTRTest{{asUpperCamelCase name}} () -@property (readonly) chip::Controller::{{asUpperCamelCase name}}Cluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::{{asUpperCamelCase name}}Cluster * cppCluster; @end @implementation MTRTest{{asUpperCamelCase name}} -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::{{asUpperCamelCase name}}Cluster **) cppClusterSlot { return &_cppCluster; } @@ -56,7 +57,7 @@ using namespace chip::app::Clusters; {{>encode_value target="cppValue" source="value" cluster=parent.name errorCode="return CHIP_ERROR_INVALID_ARGUMENT;" depth=0}} auto successFn = Callback<{{>callbackName}}CallbackType>::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index 7b97d976ad3831..d240921fb36a4d 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -141,13 +141,8 @@ void CastingServer::ReadServerClusters(EndpointId endpointId) return; } - chip::Controller::DescriptorCluster cluster; - CHIP_ERROR err = cluster.Associate(operationalDeviceProxy, endpointId); - if (err != CHIP_NO_ERROR) - { - ChipLogError(AppServer, "Associate() failed: %" CHIP_ERROR_FORMAT, err.Format()); - return; - } + chip::Controller::DescriptorCluster cluster(*operationalDeviceProxy->GetExchangeManager(), + operationalDeviceProxy->GetSecureSession().Value(), endpointId); TargetEndpointInfo * endpointInfo = mTargetVideoPlayerInfo.GetOrAddEndpoint(endpointId); @@ -193,13 +188,8 @@ CHIP_ERROR CastingServer::ContentLauncherLaunchURL(const char * contentUrl, cons return CHIP_ERROR_PEER_NODE_NOT_FOUND; } - ContentLauncherCluster cluster; - CHIP_ERROR err = cluster.Associate(operationalDeviceProxy, kTvEndpoint); - if (err != CHIP_NO_ERROR) - { - ChipLogError(AppServer, "Associate() failed: %" CHIP_ERROR_FORMAT, err.Format()); - return err; - } + ContentLauncherCluster cluster(*operationalDeviceProxy->GetExchangeManager(), + operationalDeviceProxy->GetSecureSession().Value(), kTvEndpoint); CastingServer::GetInstance()->mLaunchURLResponseCallback = launchURLResponseCallback; LaunchURL::Type request; request.contentURL = chip::CharSpan::fromCharString(contentUrl); diff --git a/scripts/idl/generators/java/ChipClustersCpp.jinja b/scripts/idl/generators/java/ChipClustersCpp.jinja index d32f20c9f40c4d..be46bfcce5eef8 100644 --- a/scripts/idl/generators/java/ChipClustersCpp.jinja +++ b/scripts/idl/generators/java/ChipClustersCpp.jinja @@ -113,9 +113,8 @@ using namespace chip::Controller; JNI_METHOD(jlong, {{cluster.name | capitalcase}}Cluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - {{cluster.name | capitalcase}}Cluster * cppCluster = new {{cluster.name | capitalcase}}Cluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + DeviceProxy * device = reinterpret_cast(devicePtr); + {{cluster.name | capitalcase}}Cluster * cppCluster = new {{cluster.name | capitalcase}}Cluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } @@ -210,4 +209,4 @@ JNI_METHOD(void, {{cluster.name}}Cluster, subscribe{{attr.definition.name | capi } {%- endif -%} -{% endfor %} \ No newline at end of file +{% endfor %} diff --git a/scripts/idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp index a166279b925079..1b1b091ef91d2b 100644 --- a/scripts/idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp @@ -27,9 +27,8 @@ using namespace chip::Controller; JNI_METHOD(jlong, DemoClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - DemoClusterCluster * cppCluster = new DemoClusterCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + DeviceProxy * device = reinterpret_cast(devicePtr); + DemoClusterCluster * cppCluster = new DemoClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } diff --git a/scripts/idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp index 6dbcef98b2173f..cc3f8d87d5790a 100644 --- a/scripts/idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp @@ -27,9 +27,8 @@ using namespace chip::Controller; JNI_METHOD(jlong, DemoClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - DemoClusterCluster * cppCluster = new DemoClusterCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + DeviceProxy * device = reinterpret_cast(devicePtr); + DemoClusterCluster * cppCluster = new DemoClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } diff --git a/scripts/idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp index 7c63c12f242f00..e984b0bd176753 100644 --- a/scripts/idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp @@ -27,9 +27,8 @@ using namespace chip::Controller; JNI_METHOD(jlong, MyClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - MyClusterCluster * cppCluster = new MyClusterCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + DeviceProxy * device = reinterpret_cast(devicePtr); + MyClusterCluster * cppCluster = new MyClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } diff --git a/scripts/idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp index ffebaf6a9d6569..1837cc6de068c8 100644 --- a/scripts/idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp @@ -27,9 +27,8 @@ using namespace chip::Controller; JNI_METHOD(jlong, FirstCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - FirstCluster * cppCluster = new FirstCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + DeviceProxy * device = reinterpret_cast(devicePtr); + FirstCluster * cppCluster = new FirstCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } diff --git a/scripts/idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp index f58cc9867f6017..22d4d2ed55aae6 100644 --- a/scripts/idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp @@ -27,9 +27,8 @@ using namespace chip::Controller; JNI_METHOD(jlong, SecondCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - SecondCluster * cppCluster = new SecondCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + DeviceProxy * device = reinterpret_cast(devicePtr); + SecondCluster * cppCluster = new SecondCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } diff --git a/scripts/idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp index 0711447fb05fb9..0e3f87807203b4 100644 --- a/scripts/idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp @@ -27,9 +27,8 @@ using namespace chip::Controller; JNI_METHOD(jlong, ThirdCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - ThirdCluster * cppCluster = new ThirdCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + DeviceProxy * device = reinterpret_cast(devicePtr); + ThirdCluster * cppCluster = new ThirdCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } diff --git a/scripts/idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp index 147e5f51d663d0..88f214f58b716a 100644 --- a/scripts/idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp @@ -27,9 +27,8 @@ using namespace chip::Controller; JNI_METHOD(jlong, MyClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - MyClusterCluster * cppCluster = new MyClusterCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + DeviceProxy * device = reinterpret_cast(devicePtr); + MyClusterCluster * cppCluster = new MyClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 73783d830297d3..222b52992246ab 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -512,8 +512,8 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(OperationalDeviceProxy * targe ChipLogProgress(Controller, "Attempting to update Binding list"); BindingListType bindingList(bindings.data(), bindings.size()); - chip::Controller::BindingCluster cluster; - ReturnErrorOnFailure(cluster.Associate(targetDeviceProxy, kTargetBindingClusterEndpointId)); + chip::Controller::BindingCluster cluster(*targetDeviceProxy->GetExchangeManager(), + targetDeviceProxy->GetSecureSession().Value(), kTargetBindingClusterEndpointId); ReturnErrorOnFailure( cluster.WriteAttribute(bindingList, nullptr, successCb, failureCb)); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index c8527633750548..3f4cf67829c56d 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -775,8 +775,8 @@ CHIP_ERROR DefaultOTARequestor::SendQueryImageRequest(OperationalDeviceProxy & d args.location.SetValue(CharSpan("XX", strlen("XX"))); } - Controller::OtaSoftwareUpdateProviderCluster cluster; - cluster.Associate(&deviceProxy, mProviderLocation.Value().endpoint); + Controller::OtaSoftwareUpdateProviderCluster cluster(*deviceProxy.GetExchangeManager(), deviceProxy.GetSecureSession().Value(), + mProviderLocation.Value().endpoint); return cluster.InvokeCommand(args, this, OnQueryImageResponse, OnQueryImageFailure); } @@ -845,8 +845,8 @@ CHIP_ERROR DefaultOTARequestor::SendApplyUpdateRequest(OperationalDeviceProxy & args.updateToken = mUpdateToken; args.newVersion = mTargetVersion; - Controller::OtaSoftwareUpdateProviderCluster cluster; - cluster.Associate(&deviceProxy, mProviderLocation.Value().endpoint); + Controller::OtaSoftwareUpdateProviderCluster cluster(*deviceProxy.GetExchangeManager(), deviceProxy.GetSecureSession().Value(), + mProviderLocation.Value().endpoint); return cluster.InvokeCommand(args, this, OnApplyUpdateResponse, OnApplyUpdateFailure); } @@ -860,8 +860,8 @@ CHIP_ERROR DefaultOTARequestor::SendNotifyUpdateAppliedRequest(OperationalDevice args.updateToken = mUpdateToken; args.softwareVersion = mCurrentVersion; - Controller::OtaSoftwareUpdateProviderCluster cluster; - cluster.Associate(&deviceProxy, mProviderLocation.Value().endpoint); + Controller::OtaSoftwareUpdateProviderCluster cluster(*deviceProxy.GetExchangeManager(), deviceProxy.GetSecureSession().Value(), + mProviderLocation.Value().endpoint); // There is no response for a notify so consider this OTA complete. Clear the provider location and reset any states to indicate // so. diff --git a/src/app/zap-templates/templates/app/CHIPClusters.zapt b/src/app/zap-templates/templates/app/CHIPClusters.zapt index 38e393c5bbd28e..6ecf0d333a3fee 100644 --- a/src/app/zap-templates/templates/app/CHIPClusters.zapt +++ b/src/app/zap-templates/templates/app/CHIPClusters.zapt @@ -18,7 +18,7 @@ namespace Controller { class DLL_EXPORT {{asUpperCamelCase name}}Cluster : public ClusterBase { public: - {{asUpperCamelCase name}}Cluster() : ClusterBase(app::Clusters::{{asUpperCamelCase name}}::Id) {} + {{asUpperCamelCase name}}Cluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, app::Clusters::{{asUpperCamelCase name}}::Id, endpoint) {} ~{{asUpperCamelCase name}}Cluster() {} }; diff --git a/src/controller/BUILD.gn b/src/controller/BUILD.gn index f136f53786e0e1..eabc7062030d42 100644 --- a/src/controller/BUILD.gn +++ b/src/controller/BUILD.gn @@ -26,10 +26,7 @@ config("config") { static_library("controller") { output_name = "libChipController" - sources = [ - "CHIPCluster.cpp", - "CHIPCluster.h", - ] + sources = [ "CHIPCluster.h" ] if (chip_controller) { sources += [ diff --git a/src/controller/CHIPCluster.cpp b/src/controller/CHIPCluster.cpp deleted file mode 100644 index b829d575cee52f..00000000000000 --- a/src/controller/CHIPCluster.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This file contains definitions for a base Cluster class. This class will - * be derived by various ZCL clusters supported by CHIP. The objects of the - * ZCL cluster class will be used by Controller applications to interact with - * the CHIP device. - */ - -#include -#include -#include - -namespace chip { -namespace Controller { - -CHIP_ERROR ClusterBase::Associate(DeviceProxy * device, EndpointId endpoint) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - // TODO: Check if the device supports mCluster at the requested endpoint - - mDevice = device; - mEndpoint = endpoint; - - return err; -} - -void ClusterBase::Dissociate() -{ - mDevice = nullptr; -} - -} // namespace Controller -} // namespace chip diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index 559dd5c2b90771..6c00089a5712b0 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -33,6 +33,7 @@ #include #include #include +#include #include namespace chip { @@ -57,9 +58,6 @@ class DLL_EXPORT ClusterBase public: virtual ~ClusterBase() {} - CHIP_ERROR Associate(DeviceProxy * device, EndpointId endpoint); - - void Dissociate(); // Temporary function to set command timeout before we move over to InvokeCommand // TODO: remove when we start using InvokeCommand everywhere void SetCommandTimeout(Optional timeout) { mTimeout = timeout; } @@ -77,8 +75,6 @@ class DLL_EXPORT ClusterBase CommandResponseSuccessCallback successCb, CommandResponseFailureCallback failureCb, const Optional & timedInvokeTimeoutMs) { - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & aPath, const app::StatusIB & aStatus, const typename RequestDataT::ResponseType & responseData) { successCb(context, responseData); @@ -86,8 +82,8 @@ class DLL_EXPORT ClusterBase auto onFailureCb = [context, failureCb](CHIP_ERROR aError) { failureCb(context, aError); }; - return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, - onSuccessCb, onFailureCb, timedInvokeTimeoutMs, mTimeout); + return InvokeCommandRequest(&mExchangeManager, mSession.Get().Value(), mEndpoint, requestData, onSuccessCb, onFailureCb, + timedInvokeTimeoutMs, mTimeout); } template @@ -119,8 +115,6 @@ class DLL_EXPORT ClusterBase const Optional & aTimedWriteTimeoutMs, WriteResponseDoneCallback doneCb = nullptr, const Optional & aDataVersion = NullOptional) { - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & aPath) { if (successCb != nullptr) { @@ -142,9 +136,8 @@ class DLL_EXPORT ClusterBase } }; - return chip::Controller::WriteAttribute(mDevice->GetSecureSession().Value(), mEndpoint, clusterId, attributeId, - requestData, onSuccessCb, onFailureCb, aTimedWriteTimeoutMs, onDoneCb, - aDataVersion); + return chip::Controller::WriteAttribute(mSession.Get().Value(), mEndpoint, clusterId, attributeId, requestData, + onSuccessCb, onFailureCb, aTimedWriteTimeoutMs, onDoneCb, aDataVersion); } template @@ -235,8 +228,6 @@ class DLL_EXPORT ClusterBase ReadResponseSuccessCallback successCb, ReadResponseFailureCallback failureCb, bool aIsFabricFiltered = true) { - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & aPath, const DecodableType & aData) { if (successCb != nullptr) { @@ -251,9 +242,8 @@ class DLL_EXPORT ClusterBase } }; - return Controller::ReadAttribute(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), - mEndpoint, clusterId, attributeId, onSuccessCb, onFailureCb, - aIsFabricFiltered); + return Controller::ReadAttribute(&mExchangeManager, mSession.Get().Value(), mEndpoint, clusterId, + attributeId, onSuccessCb, onFailureCb, aIsFabricFiltered); } /** @@ -283,8 +273,6 @@ class DLL_EXPORT ClusterBase bool aKeepPreviousSubscriptions = false, const Optional & aDataVersion = NullOptional) { - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - auto onReportCb = [context, reportCb](const app::ConcreteAttributePath & aPath, const DecodableType & aData) { if (reportCb != nullptr) { @@ -315,8 +303,8 @@ class DLL_EXPORT ClusterBase }; return Controller::SubscribeAttribute( - mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, clusterId, attributeId, onReportCb, - onFailureCb, minIntervalFloorSeconds, maxIntervalCeilingSeconds, onSubscriptionEstablishedCb, onResubscriptionAttemptCb, + &mExchangeManager, mSession.Get().Value(), mEndpoint, clusterId, attributeId, onReportCb, onFailureCb, + minIntervalFloorSeconds, maxIntervalCeilingSeconds, onSubscriptionEstablishedCb, onResubscriptionAttemptCb, aIsFabricFiltered, aKeepPreviousSubscriptions, aDataVersion); } @@ -332,8 +320,6 @@ class DLL_EXPORT ClusterBase CHIP_ERROR ReadEvent(void * context, ReadResponseSuccessCallback successCb, ReadResponseFailureCallback failureCb, ReadDoneCallback doneCb) { - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - auto onSuccessCb = [context, successCb](const app::EventHeader & aEventHeader, const DecodableType & aData) { if (successCb != nullptr) { @@ -354,8 +340,8 @@ class DLL_EXPORT ClusterBase doneCb(context); } }; - return Controller::ReadEvent(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, - onSuccessCb, onFailureCb, onDoneCb); + return Controller::ReadEvent(&mExchangeManager, mSession.Get().Value(), mEndpoint, onSuccessCb, onFailureCb, + onDoneCb); } template @@ -366,8 +352,6 @@ class DLL_EXPORT ClusterBase ResubscriptionAttemptCallback resubscriptionAttemptCb = nullptr, bool aKeepPreviousSubscriptions = false, bool aIsUrgentEvent = false) { - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - auto onReportCb = [context, reportCb](const app::EventHeader & aEventHeader, const DecodableType & aData) { if (reportCb != nullptr) { @@ -397,17 +381,27 @@ class DLL_EXPORT ClusterBase } }; - return Controller::SubscribeEvent(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), - mEndpoint, onReportCb, onFailureCb, minIntervalFloorSeconds, - maxIntervalCeilingSeconds, onSubscriptionEstablishedCb, - onResubscriptionAttemptCb, aKeepPreviousSubscriptions, aIsUrgentEvent); + return Controller::SubscribeEvent(&mExchangeManager, mSession.Get().Value(), mEndpoint, onReportCb, + onFailureCb, minIntervalFloorSeconds, maxIntervalCeilingSeconds, + onSubscriptionEstablishedCb, onResubscriptionAttemptCb, + aKeepPreviousSubscriptions, aIsUrgentEvent); } protected: - ClusterBase(ClusterId cluster) : mClusterId(cluster) {} + ClusterBase(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, ClusterId cluster, + EndpointId endpoint) : + mExchangeManager(exchangeManager), + mSession(session), mClusterId(cluster), mEndpoint(endpoint) + {} + + Messaging::ExchangeManager & mExchangeManager; + + // Since cluster object is ephemeral, the session shall be valid during the entire lifespan, so we do not need to check the + // session existence when using it. For java and objective-c binding, the cluster object is allocated in the heap, such that we + // can't use SessionHandle here, in such case, the cluster object must be freed when the session is released. + SessionHolder mSession; const ClusterId mClusterId; - DeviceProxy * mDevice; EndpointId mEndpoint; Optional mTimeout; }; diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 973b497fea74fc..158a30d620cb2c 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -830,8 +830,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, CommandResponseSuccessCallback successCb, CommandResponseFailureCallback failureCb, EndpointId endpoint, Optional timeout) { - ClusterObjectT cluster; - cluster.Associate(device, endpoint); + ClusterObjectT cluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpoint); cluster.SetCommandTimeout(timeout); return cluster.InvokeCommand(request, this, successCb, failureCb); diff --git a/src/controller/CommissioningWindowOpener.cpp b/src/controller/CommissioningWindowOpener.cpp index e9729b42c57a27..6b67a2efbfee29 100644 --- a/src/controller/CommissioningWindowOpener.cpp +++ b/src/controller/CommissioningWindowOpener.cpp @@ -125,8 +125,8 @@ CHIP_ERROR CommissioningWindowOpener::OpenCommissioningWindowInternal(Operationa constexpr EndpointId kAdministratorCommissioningClusterEndpoint = 0; - AdministratorCommissioningCluster cluster; - cluster.Associate(device, kAdministratorCommissioningClusterEndpoint); + AdministratorCommissioningCluster cluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), + kAdministratorCommissioningClusterEndpoint); if (mCommissioningWindowOption != CommissioningWindowOption::kOriginalSetupCode) { @@ -262,8 +262,7 @@ void CommissioningWindowOpener::OnDeviceConnectedCallback(void * context, Operat { case Step::kReadVID: { constexpr EndpointId kBasicClusterEndpoint = 0; - BasicCluster cluster; - cluster.Associate(device, kBasicClusterEndpoint); + BasicCluster cluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), kBasicClusterEndpoint); err = cluster.ReadAttribute(context, OnVIDReadResponse, OnVIDPIDReadFailureResponse); #if CHIP_ERROR_LOGGING @@ -273,8 +272,7 @@ void CommissioningWindowOpener::OnDeviceConnectedCallback(void * context, Operat } case Step::kReadPID: { constexpr EndpointId kBasicClusterEndpoint = 0; - chip::Controller::BasicCluster cluster; - cluster.Associate(device, kBasicClusterEndpoint); + BasicCluster cluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), kBasicClusterEndpoint); err = cluster.ReadAttribute(context, OnPIDReadResponse, OnVIDPIDReadFailureResponse); #if CHIP_ERROR_LOGGING diff --git a/src/darwin/Framework/CHIP/MTRCluster.h b/src/darwin/Framework/CHIP/MTRCluster.h index 75ba8c1c7f84f9..d7cc4e1c810af5 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.h +++ b/src/darwin/Framework/CHIP/MTRCluster.h @@ -26,9 +26,6 @@ NS_ASSUME_NONNULL_BEGIN * This is the base class for clusters. */ @interface MTRCluster : NSObject -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index 37e4df6fb2ac92..384c509565420d 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -22,33 +22,14 @@ using namespace ::chip; @implementation MTRCluster -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(EndpointId)endpoint queue:(dispatch_queue_t)queue +- (instancetype)initWithQueue:(dispatch_queue_t)queue { if (self = [super init]) { - Controller::ClusterBase * cppCluster = [self getCluster]; - if (cppCluster == nullptr) { - return nil; - } - - if (device == nullptr) { - return nil; - } - - CHIP_ERROR err = cppCluster->Associate([device internalDevice], endpoint); - if (err != CHIP_NO_ERROR) { - return nil; - } - _callbackQueue = queue; } return self; } -- (Controller::ClusterBase *)getCluster -{ - return nullptr; -} - - (chip::ByteSpan)asByteSpan:(NSData *)value { return AsByteSpan(value); diff --git a/src/darwin/Framework/CHIP/MTRCluster_internal.h b/src/darwin/Framework/CHIP/MTRCluster_internal.h index 7cb0bb86a7ed0e..2ef58581c9e6f8 100644 --- a/src/darwin/Framework/CHIP/MTRCluster_internal.h +++ b/src/darwin/Framework/CHIP/MTRCluster_internal.h @@ -24,11 +24,13 @@ #import "zap-generated/CHIPClusters.h" #import "zap-generated/MTRClustersObjc.h" -using namespace chip::app::Clusters; +NS_ASSUME_NONNULL_BEGIN @interface MTRCluster () @property (readonly, nonatomic) dispatch_queue_t callbackQueue; -- (chip::Controller::ClusterBase *)getCluster; +- (nullable instancetype)initWithQueue:(dispatch_queue_t)queue; - (chip::ByteSpan)asByteSpan:(NSData *)value; - (chip::CharSpan)asCharSpan:(NSString *)value; @end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/templates/MTRClustersObjc-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClustersObjc-src.zapt index d15c19d82d47bb..7e8152218b09a2 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClustersObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClustersObjc-src.zapt @@ -12,6 +12,7 @@ #import "MTRCommandPayloadsObjc.h" #include +#include #include using chip::Callback::Callback; @@ -21,7 +22,25 @@ using namespace chip::app::Clusters; {{#chip_client_clusters includeAll=true}} @implementation MTR{{asUpperCamelCase name}} -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::{{asUpperCamelCase name}}Cluster(*[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::{{asUpperCamelCase name}}Cluster **) cppClusterSlot { return &_cppCluster; } @@ -79,7 +98,7 @@ using namespace chip::app::Clusters; ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback<{{>callbackName}}CallbackType>::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster->InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } {{/chip_cluster_commands}} @@ -102,7 +121,7 @@ using namespace chip::app::Clusters; using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; auto successFn = Callback<{{>attribute_data_callback_name}}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 {{~#if_is_fabric_scoped_struct type~}} , params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue] {{~/if_is_fabric_scoped_struct~}} @@ -144,7 +163,7 @@ using namespace chip::app::Clusters; {{>encode_value target="cppValue" source="value" cluster=parent.name errorCode="return CHIP_ERROR_INVALID_ARGUMENT;" depth=0}} auto successFn = Callback<{{>callbackName}}CallbackType>::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -167,7 +186,7 @@ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEs using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; auto successFn = Callback<{{>attribute_data_callback_name}}Callback>::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue] ); @@ -201,6 +220,16 @@ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEs {{/if}} {{/chip_server_cluster_attributes}} +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClustersObjc.zapt b/src/darwin/Framework/CHIP/templates/MTRClustersObjc.zapt index 3794cf978758bb..e1fcaee949a99d 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClustersObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClustersObjc.zapt @@ -22,6 +22,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTR{{asUpperCamelCase name}} : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + {{#chip_cluster_commands}} - (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completionHandler:({{>command_completion_type command=.}})completionHandler; {{#unless (hasArguments)}} @@ -54,6 +58,9 @@ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEs {{/if}} {{/chip_server_cluster_attributes}} +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClustersObjc_internal.zapt b/src/darwin/Framework/CHIP/templates/MTRClustersObjc_internal.zapt index 5641aed228461f..134372f0d366a3 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClustersObjc_internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClustersObjc_internal.zapt @@ -7,7 +7,9 @@ {{#chip_client_clusters includeAll=true}} @interface MTR{{asUpperCamelCase name}} () -@property (readonly) chip::Controller::{{asUpperCamelCase name}}Cluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::{{asUpperCamelCase name}}Cluster * cppCluster; +- (chip::Controller::{{asUpperCamelCase name}}Cluster **) cppClusterSlot; @end {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.h index dc1526bddb354d..9aba082e93ca66 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.h @@ -36,6 +36,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRIdentify : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params completionHandler:(StatusCompletion)completionHandler; @@ -171,6 +175,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -179,6 +186,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRGroups : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params completionHandler: (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -305,6 +316,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -313,6 +327,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRScenes : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completionHandler: (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -538,6 +556,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -546,6 +567,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTROnOff : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)offWithCompletionHandler:(StatusCompletion)completionHandler; - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; @@ -745,6 +770,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -753,6 +781,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTROnOffSwitchConfiguration : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -883,6 +915,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -891,6 +926,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRLevelControl : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHandler:(StatusCompletion)completionHandler; @@ -1274,6 +1313,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -1282,6 +1324,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBinaryInputBasic : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeActiveTextWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -1553,6 +1599,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -1561,6 +1610,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRDescriptor : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeDeviceListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1716,6 +1769,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -1724,6 +1780,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBinding : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -1835,6 +1895,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -1843,6 +1906,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRAccessControl : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -2031,6 +2098,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -2039,6 +2109,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBridgedActions : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)instantActionWithParams:(MTRBridgedActionsClusterInstantActionParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)instantActionWithTransitionWithParams:(MTRBridgedActionsClusterInstantActionWithTransitionParams *)params @@ -2204,6 +2278,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -2212,6 +2289,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBasic : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)mfgSpecificPingWithCompletionHandler:(StatusCompletion)completionHandler; @@ -2666,6 +2747,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -2674,6 +2758,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTROtaSoftwareUpdateProvider : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -2774,6 +2862,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -2782,6 +2873,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTROtaSoftwareUpdateRequestor : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completionHandler:(StatusCompletion)completionHandler; @@ -2954,6 +3049,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -2962,6 +3060,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRLocalizationConfiguration : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -3093,6 +3195,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -3101,6 +3206,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRTimeFormatLocalization : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeHourFormatWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -3254,6 +3363,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -3262,6 +3374,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRUnitLocalization : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -3375,6 +3491,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -3383,6 +3502,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRPowerSourceConfiguration : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the @@ -3489,6 +3612,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -3497,6 +3623,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRPowerSource : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the @@ -4158,6 +4288,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -4166,6 +4299,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRGeneralCommissioning : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -4368,6 +4505,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -4376,6 +4516,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRNetworkCommissioning : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -4633,6 +4777,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -4641,6 +4788,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRDiagnosticLogs : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -4736,6 +4887,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -4744,6 +4898,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRGeneralDiagnostics : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completionHandler:(StatusCompletion)completionHandler; @@ -4999,6 +5157,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -5007,6 +5168,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRSoftwareDiagnostics : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler; @@ -5175,6 +5340,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -5183,6 +5351,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRThreadNetworkDiagnostics : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; @@ -6417,6 +6589,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -6425,6 +6600,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRWiFiNetworkDiagnostics : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; @@ -6751,6 +6930,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -6759,6 +6941,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTREthernetNetworkDiagnostics : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; @@ -7012,6 +7198,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -7020,6 +7209,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBridgedDeviceBasic : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeVendorNameWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -7375,6 +7568,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -7383,6 +7579,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRSwitch : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -7528,6 +7728,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -7536,6 +7739,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRAdministratorCommissioning : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params @@ -7689,6 +7896,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -7697,6 +7907,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTROperationalCredentials : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -7918,6 +8132,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -7926,6 +8143,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRGroupKeyManagement : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params @@ -8102,6 +8323,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -8110,6 +8334,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRFixedLabel : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeLabelListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -8217,6 +8445,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -8225,6 +8456,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRUserLabel : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeLabelListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -8336,6 +8571,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -8344,6 +8582,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBooleanState : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeStateValueWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -8452,6 +8694,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -8460,6 +8705,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRModeSelect : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completionHandler:(StatusCompletion)completionHandler; @@ -8664,6 +8913,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -8672,6 +8924,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRDoorLock : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params @@ -9541,6 +9797,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -9549,6 +9808,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRWindowCovering : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler; @@ -10068,6 +10331,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -10076,6 +10342,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRBarrierControl : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params @@ -10383,6 +10653,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -10391,6 +10664,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRPumpConfigurationAndControl : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -10903,6 +11180,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -10911,6 +11191,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRThermostat : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params @@ -12036,6 +12320,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -12044,6 +12331,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRFanControl : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeFanModeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -12349,6 +12640,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -12357,6 +12651,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRThermostatUserInterfaceConfiguration : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value @@ -12518,6 +12816,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -12526,6 +12827,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRColorControl : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(StatusCompletion)completionHandler; @@ -13617,6 +13922,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -13625,6 +13933,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRIlluminanceMeasurement : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -13804,6 +14116,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -13812,6 +14127,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRTemperatureMeasurement : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -13973,6 +14292,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -13981,6 +14303,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRPressureMeasurement : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -14228,6 +14554,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -14236,6 +14565,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRFlowMeasurement : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -14397,6 +14730,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -14405,6 +14741,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRRelativeHumidityMeasurement : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -14566,6 +14906,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -14574,6 +14917,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTROccupancySensing : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeOccupancyWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -14939,6 +15286,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -14947,6 +15297,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRWakeOnLan : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeMACAddressWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -15055,6 +15409,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -15063,6 +15420,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRChannel : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -15214,6 +15575,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -15222,6 +15586,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRTargetNavigator : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -15351,6 +15719,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -15359,6 +15730,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRMediaPlayback : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params completionHandler: (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -15622,6 +15997,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -15630,6 +16008,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRMediaInput : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; @@ -15764,6 +16146,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -15772,6 +16157,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRLowPower : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler; @@ -15866,6 +16255,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -15874,6 +16266,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRKeypadInput : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completionHandler: (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -15969,6 +16365,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -15977,6 +16376,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRContentLauncher : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -16116,6 +16519,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -16124,6 +16530,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRAudioOutput : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params @@ -16254,6 +16664,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -16262,6 +16675,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRApplicationLauncher : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -16403,6 +16820,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -16411,6 +16831,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRApplicationBasic : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)readAttributeVendorNameWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -16640,6 +17064,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -16648,6 +17075,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRAccountLogin : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; @@ -16747,6 +17178,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -16755,6 +17189,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRElectricalMeasurement : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)getProfileInfoCommandWithCompletionHandler:(StatusCompletion)completionHandler; @@ -19253,6 +19691,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end /** @@ -19261,6 +19702,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface MTRTestCluster : MTRCluster +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)testWithCompletionHandler:(StatusCompletion)completionHandler; - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params @@ -21155,6 +21600,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + @end typedef NS_ENUM(uint8_t, MTRIdentifyEffectIdentifier) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm index 94746c04cb4648..518abbae399411 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm @@ -29,6 +29,7 @@ #import "MTRStructsObjc.h" #include +#include #include using chip::Callback::Callback; @@ -37,7 +38,26 @@ // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. @implementation MTRIdentify -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::IdentifyCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::IdentifyCluster **)cppClusterSlot { return &_cppCluster; } @@ -62,7 +82,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -91,7 +111,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -103,7 +123,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -134,7 +154,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -155,7 +175,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -196,7 +216,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -216,7 +236,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -258,7 +278,7 @@ new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -280,7 +300,7 @@ new MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -323,7 +343,7 @@ new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -345,7 +365,7 @@ new MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -388,7 +408,7 @@ new MTRIdentifyAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -408,7 +428,7 @@ new MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -450,7 +470,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -470,7 +490,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -510,7 +530,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -531,7 +551,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -565,11 +585,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRGroups -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::GroupsCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::GroupsCluster **)cppClusterSlot { return &_cppCluster; } @@ -593,7 +642,7 @@ new MTRGroupsClusterAddGroupResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -616,7 +665,7 @@ new MTRGroupsClusterViewGroupResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -660,7 +709,7 @@ new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -683,7 +732,7 @@ new MTRGroupsClusterRemoveGroupResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -712,7 +761,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -739,7 +788,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -751,7 +800,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -771,7 +820,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -813,7 +862,7 @@ new MTRGroupsGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -835,7 +884,7 @@ new MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -878,7 +927,7 @@ new MTRGroupsAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -900,7 +949,7 @@ new MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -943,7 +992,7 @@ new MTRGroupsAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -963,7 +1012,7 @@ new MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1004,7 +1053,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1024,7 +1073,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1064,7 +1113,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1085,7 +1134,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1119,11 +1168,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRScenes -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ScenesCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ScenesCluster **)cppClusterSlot { return &_cppCluster; } @@ -1220,7 +1298,7 @@ new MTRScenesClusterAddSceneResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1244,7 +1322,7 @@ new MTRScenesClusterViewSceneResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1268,7 +1346,7 @@ new MTRScenesClusterRemoveSceneResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1291,7 +1369,7 @@ new MTRScenesClusterRemoveAllScenesResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1315,7 +1393,7 @@ new MTRScenesClusterStoreSceneResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1350,7 +1428,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1373,7 +1451,7 @@ new MTRScenesClusterGetSceneMembershipResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1470,7 +1548,7 @@ new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1494,7 +1572,7 @@ new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1521,7 +1599,7 @@ new MTRScenesClusterCopySceneResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -1533,7 +1611,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1553,7 +1631,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1593,7 +1671,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1613,7 +1691,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1654,7 +1732,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1674,7 +1752,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1715,7 +1793,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1735,7 +1813,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1775,7 +1853,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); }); } @@ -1795,7 +1873,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1837,7 +1915,7 @@ new MTRNullableInt64uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1858,7 +1936,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1900,7 +1978,7 @@ new MTRScenesGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1922,7 +2000,7 @@ new MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -1965,7 +2043,7 @@ new MTRScenesAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1987,7 +2065,7 @@ new MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2030,7 +2108,7 @@ new MTRScenesAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2050,7 +2128,7 @@ new MTRScenesAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2091,7 +2169,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2111,7 +2189,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2151,7 +2229,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2172,7 +2250,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2206,11 +2284,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTROnOff -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::OnOffCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::OnOffCluster **)cppClusterSlot { return &_cppCluster; } @@ -2238,7 +2345,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -2266,7 +2373,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -2294,7 +2401,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -2321,7 +2428,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -2350,7 +2457,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -2378,7 +2485,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -2389,7 +2496,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2409,7 +2516,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2449,7 +2556,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2470,7 +2577,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2510,7 +2617,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2541,7 +2648,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -2562,7 +2669,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2602,7 +2709,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2633,7 +2740,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -2654,7 +2761,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2696,7 +2803,7 @@ new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2732,7 +2839,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -2753,7 +2860,7 @@ new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2796,7 +2903,7 @@ new MTROnOffGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2818,7 +2925,7 @@ new MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2861,7 +2968,7 @@ new MTROnOffAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2883,7 +2990,7 @@ new MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2926,7 +3033,7 @@ new MTROnOffAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2946,7 +3053,7 @@ new MTROnOffAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -2987,7 +3094,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3007,7 +3114,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3047,7 +3154,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3068,7 +3175,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3102,11 +3209,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTROnOffSwitchConfiguration -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::OnOffSwitchConfigurationCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::OnOffSwitchConfigurationCluster **)cppClusterSlot { return &_cppCluster; } @@ -3118,7 +3254,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3138,7 +3274,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3178,7 +3314,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3209,7 +3345,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -3231,7 +3367,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3273,7 +3409,7 @@ new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3295,7 +3431,7 @@ new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscrip 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3339,7 +3475,7 @@ new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3361,7 +3497,7 @@ new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscript 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3405,7 +3541,7 @@ new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3425,7 +3561,7 @@ new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3467,7 +3603,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3487,7 +3623,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3527,7 +3663,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3548,7 +3684,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3582,11 +3718,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRLevelControl -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::LevelControlCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::LevelControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -3615,7 +3780,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -3643,7 +3808,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -3672,7 +3837,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -3698,7 +3863,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -3725,7 +3890,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -3752,7 +3917,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -3780,7 +3945,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -3809,7 +3974,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -3835,7 +4000,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -3847,7 +4012,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3867,7 +4032,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3908,7 +4073,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3929,7 +4094,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -3970,7 +4135,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3990,7 +4155,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4030,7 +4195,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4050,7 +4215,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4090,7 +4255,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4111,7 +4276,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4152,7 +4317,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4172,7 +4337,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4213,7 +4378,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4233,7 +4398,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4273,7 +4438,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4304,7 +4469,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -4325,7 +4490,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4365,7 +4530,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4396,7 +4561,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -4419,7 +4584,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4460,7 +4625,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4496,7 +4661,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -4517,7 +4682,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4558,7 +4723,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4594,7 +4759,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -4616,7 +4781,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4658,7 +4823,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4694,7 +4859,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -4716,7 +4881,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4758,7 +4923,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4794,7 +4959,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -4816,7 +4981,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4858,7 +5023,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4894,7 +5059,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -4917,7 +5082,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -4959,7 +5124,7 @@ new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4981,7 +5146,7 @@ new MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5024,7 +5189,7 @@ new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5046,7 +5211,7 @@ new MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5089,7 +5254,7 @@ new MTRLevelControlAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5109,7 +5274,7 @@ new MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5151,7 +5316,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5171,7 +5336,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5211,7 +5376,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5232,7 +5397,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5266,11 +5431,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRBinaryInputBasic -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::BinaryInputBasicCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::BinaryInputBasicCluster **)cppClusterSlot { return &_cppCluster; } @@ -5282,7 +5476,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5313,7 +5507,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -5334,7 +5528,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5374,7 +5568,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5405,7 +5599,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -5426,7 +5620,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5467,7 +5661,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5498,7 +5692,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -5519,7 +5713,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5560,7 +5754,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5591,7 +5785,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -5612,7 +5806,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5653,7 +5847,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5673,7 +5867,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5713,7 +5907,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5744,7 +5938,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -5765,7 +5959,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5806,7 +6000,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5837,7 +6031,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -5858,7 +6052,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5899,7 +6093,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5919,7 +6113,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -5960,7 +6154,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5981,7 +6175,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6023,7 +6217,7 @@ new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6045,7 +6239,7 @@ new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBrid 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6088,7 +6282,7 @@ new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6110,7 +6304,7 @@ new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6153,7 +6347,7 @@ new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6173,7 +6367,7 @@ new MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6215,7 +6409,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6235,7 +6429,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6275,7 +6469,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6296,7 +6490,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6330,11 +6524,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRDescriptor -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::DescriptorCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::DescriptorCluster **)cppClusterSlot { return &_cppCluster; } @@ -6347,7 +6570,7 @@ new MTRDescriptorDeviceListListAttributeCallbackBridge( using TypeInfo = Descriptor::Attributes::DeviceList::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); }); } @@ -6367,7 +6590,7 @@ new MTRDescriptorDeviceListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorDeviceListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6408,7 +6631,7 @@ new MTRDescriptorServerListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6428,7 +6651,7 @@ new MTRDescriptorServerListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6469,7 +6692,7 @@ new MTRDescriptorClientListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6489,7 +6712,7 @@ new MTRDescriptorClientListListAttributeCallbackSubscriptionBridge( using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6530,7 +6753,7 @@ new MTRDescriptorPartsListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6550,7 +6773,7 @@ new MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6591,7 +6814,7 @@ new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6613,7 +6836,7 @@ new MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6656,7 +6879,7 @@ new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6678,7 +6901,7 @@ new MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6721,7 +6944,7 @@ new MTRDescriptorAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6741,7 +6964,7 @@ new MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6783,7 +7006,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6803,7 +7026,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6843,7 +7066,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6864,7 +7087,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -6898,11 +7121,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRBinding -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::BindingCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::BindingCluster **)cppClusterSlot { return &_cppCluster; } @@ -6915,7 +7167,7 @@ new MTRBindingBindingListAttributeCallbackBridge( 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, + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } @@ -6984,7 +7236,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -7005,7 +7257,7 @@ new MTRBindingBindingListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7046,7 +7298,7 @@ new MTRBindingGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7068,7 +7320,7 @@ new MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7111,7 +7363,7 @@ new MTRBindingAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7133,7 +7385,7 @@ new MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7176,7 +7428,7 @@ new MTRBindingAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7196,7 +7448,7 @@ new MTRBindingAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7237,7 +7489,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7257,7 +7509,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7297,7 +7549,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7318,7 +7570,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7352,11 +7604,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRAccessControl -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::AccessControlCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::AccessControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -7369,7 +7650,7 @@ new MTRAccessControlAclListAttributeCallbackBridge( using TypeInfo = AccessControl::Attributes::Acl::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]); }); } @@ -7499,7 +7780,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -7520,7 +7801,7 @@ new MTRAccessControlAclListAttributeCallbackSubscriptionBridge( using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7561,7 +7842,7 @@ new MTRAccessControlExtensionListAttributeCallbackBridge( using TypeInfo = AccessControl::Attributes::Extension::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]); }); } @@ -7615,7 +7896,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -7636,7 +7917,7 @@ new MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge( using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7677,7 +7958,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::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); }); } @@ -7699,7 +7980,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7740,7 +8021,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::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); }); } @@ -7762,7 +8043,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7803,7 +8084,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::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); }); } @@ -7825,7 +8106,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7867,7 +8148,7 @@ new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = AccessControl::Attributes::GeneratedCommandList::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); }); } @@ -7889,7 +8170,7 @@ new MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7932,7 +8213,7 @@ new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = AccessControl::Attributes::AcceptedCommandList::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); }); } @@ -7954,7 +8235,7 @@ new MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -7997,7 +8278,7 @@ new MTRAccessControlAttributeListListAttributeCallbackBridge( using TypeInfo = AccessControl::Attributes::AttributeList::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); }); } @@ -8017,7 +8298,7 @@ new MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8059,7 +8340,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8079,7 +8360,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8119,7 +8400,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = AccessControl::Attributes::ClusterRevision::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); }); } @@ -8140,7 +8421,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8174,11 +8455,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRBridgedActions -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::BridgedActionsCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::BridgedActionsCluster **)cppClusterSlot { return &_cppCluster; } @@ -8208,7 +8518,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8239,7 +8549,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8269,7 +8579,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8300,7 +8610,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8330,7 +8640,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8360,7 +8670,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8391,7 +8701,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8421,7 +8731,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8451,7 +8761,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8482,7 +8792,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8512,7 +8822,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8543,7 +8853,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -8556,7 +8866,7 @@ new MTRBridgedActionsActionListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8576,7 +8886,7 @@ new MTRBridgedActionsActionListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8618,7 +8928,7 @@ new MTRBridgedActionsEndpointListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8638,7 +8948,7 @@ new MTRBridgedActionsEndpointListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsEndpointListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8680,7 +8990,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8700,7 +9010,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8741,7 +9051,7 @@ new MTRBridgedActionsGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8763,7 +9073,7 @@ new MTRBridgedActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8806,7 +9116,7 @@ new MTRBridgedActionsAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8828,7 +9138,7 @@ new MTRBridgedActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8871,7 +9181,7 @@ new MTRBridgedActionsAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8891,7 +9201,7 @@ new MTRBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8933,7 +9243,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8953,7 +9263,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -8993,7 +9303,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9014,7 +9324,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9048,11 +9358,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRBasic -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::BasicCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::BasicCluster **)cppClusterSlot { return &_cppCluster; } @@ -9081,7 +9420,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -9093,7 +9432,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9114,7 +9453,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9155,7 +9494,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9175,7 +9514,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9215,7 +9554,7 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9235,7 +9574,7 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9275,7 +9614,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9295,7 +9634,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9336,7 +9675,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9356,7 +9695,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9396,7 +9735,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9427,7 +9766,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -9448,7 +9787,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9488,7 +9827,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9519,7 +9858,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -9540,7 +9879,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9580,7 +9919,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9601,7 +9940,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9642,7 +9981,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9664,7 +10003,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9705,7 +10044,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9726,7 +10065,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9767,7 +10106,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9789,7 +10128,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9830,7 +10169,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9851,7 +10190,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9892,7 +10231,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9912,7 +10251,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -9952,7 +10291,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9972,7 +10311,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10012,7 +10351,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10032,7 +10371,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10073,7 +10412,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10093,7 +10432,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10134,7 +10473,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10165,7 +10504,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -10188,7 +10527,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10229,7 +10568,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10249,7 +10588,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10289,7 +10628,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10309,7 +10648,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10350,7 +10689,7 @@ new MTRBasicCapabilityMinimaStructAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10371,7 +10710,7 @@ new MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10414,7 +10753,7 @@ new MTRBasicGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10436,7 +10775,7 @@ new MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10479,7 +10818,7 @@ new MTRBasicAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10501,7 +10840,7 @@ new MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10544,7 +10883,7 @@ new MTRBasicAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10564,7 +10903,7 @@ new MTRBasicAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10605,7 +10944,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10625,7 +10964,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10665,7 +11004,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10686,7 +11025,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10720,11 +11059,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTROtaSoftwareUpdateProvider -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::OtaSoftwareUpdateProviderCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::OtaSoftwareUpdateProviderCluster **)cppClusterSlot { return &_cppCluster; } @@ -10788,7 +11156,7 @@ new MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -10812,7 +11180,7 @@ new MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -10839,7 +11207,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -10852,7 +11220,7 @@ new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10874,7 +11242,7 @@ new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10918,7 +11286,7 @@ new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10940,7 +11308,7 @@ new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscrip 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -10984,7 +11352,7 @@ new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11004,7 +11372,7 @@ new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11046,7 +11414,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11066,7 +11434,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11106,7 +11474,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11127,7 +11495,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11161,11 +11529,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTROtaSoftwareUpdateRequestor -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::OtaSoftwareUpdateRequestorCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::OtaSoftwareUpdateRequestorCluster **)cppClusterSlot { return &_cppCluster; } @@ -11199,7 +11596,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -11212,7 +11609,7 @@ new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( 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, + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } @@ -11267,7 +11664,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -11290,7 +11687,7 @@ new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11333,7 +11730,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11354,7 +11751,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11397,7 +11794,7 @@ new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridg 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); }); } @@ -11418,7 +11815,7 @@ new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubsc auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -11463,7 +11860,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11485,7 +11882,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11527,7 +11924,7 @@ new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11549,7 +11946,7 @@ new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11593,7 +11990,7 @@ new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11615,7 +12012,7 @@ new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11659,7 +12056,7 @@ new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11679,7 +12076,7 @@ new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionB 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11721,7 +12118,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11741,7 +12138,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11781,7 +12178,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11802,7 +12199,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11836,11 +12233,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRLocalizationConfiguration -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::LocalizationConfigurationCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::LocalizationConfigurationCluster **)cppClusterSlot { return &_cppCluster; } @@ -11852,7 +12278,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11883,7 +12309,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -11904,7 +12330,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -11946,7 +12372,7 @@ new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::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); }); } @@ -11967,7 +12393,7 @@ new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptio 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12010,7 +12436,7 @@ new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12032,7 +12458,7 @@ new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12076,7 +12502,7 @@ new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12098,7 +12524,7 @@ new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscrip 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12142,7 +12568,7 @@ new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12162,7 +12588,7 @@ new MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12204,7 +12630,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12224,7 +12650,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12264,7 +12690,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12285,7 +12711,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12319,11 +12745,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRTimeFormatLocalization -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::TimeFormatLocalizationCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::TimeFormatLocalizationCluster **)cppClusterSlot { return &_cppCluster; } @@ -12336,7 +12791,7 @@ new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge( using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::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); }); } @@ -12367,7 +12822,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -12388,7 +12843,7 @@ new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridg using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12430,7 +12885,7 @@ new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge( using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::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); }); } @@ -12461,7 +12916,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -12483,7 +12938,7 @@ new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBri using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12526,7 +12981,7 @@ new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge( using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::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); }); } @@ -12548,7 +13003,7 @@ new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscrip using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12592,7 +13047,7 @@ new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::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); }); } @@ -12614,7 +13069,7 @@ new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscripti using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12657,7 +13112,7 @@ new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::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); }); } @@ -12679,7 +13134,7 @@ new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptio using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12722,7 +13177,7 @@ new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12742,7 +13197,7 @@ new MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12784,7 +13239,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12804,7 +13259,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12844,7 +13299,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::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); }); } @@ -12865,7 +13320,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -12899,11 +13354,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRUnitLocalization -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::UnitLocalizationCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::UnitLocalizationCluster **)cppClusterSlot { return &_cppCluster; } @@ -12916,7 +13400,7 @@ new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge( using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::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); }); } @@ -12947,7 +13431,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -12969,7 +13453,7 @@ new MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13012,7 +13496,7 @@ new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13034,7 +13518,7 @@ new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBrid 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13077,7 +13561,7 @@ new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13099,7 +13583,7 @@ new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13142,7 +13626,7 @@ new MTRUnitLocalizationAttributeListListAttributeCallbackBridge( using TypeInfo = UnitLocalization::Attributes::AttributeList::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); }); } @@ -13162,7 +13646,7 @@ new MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13204,7 +13688,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = UnitLocalization::Attributes::FeatureMap::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); }); } @@ -13224,7 +13708,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13264,7 +13748,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = UnitLocalization::Attributes::ClusterRevision::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); }); } @@ -13285,7 +13769,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13319,11 +13803,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRPowerSourceConfiguration -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::PowerSourceConfigurationCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::PowerSourceConfigurationCluster **)cppClusterSlot { return &_cppCluster; } @@ -13335,7 +13848,7 @@ new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13355,7 +13868,7 @@ new MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13397,7 +13910,7 @@ new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13419,7 +13932,7 @@ new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscrip 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13463,7 +13976,7 @@ new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13485,7 +13998,7 @@ new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscript 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13529,7 +14042,7 @@ new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13549,7 +14062,7 @@ new MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13591,7 +14104,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13611,7 +14124,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13651,7 +14164,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13672,7 +14185,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13706,11 +14219,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRPowerSource -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::PowerSourceCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::PowerSourceCluster **)cppClusterSlot { return &_cppCluster; } @@ -13721,7 +14263,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13741,7 +14283,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13780,7 +14322,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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 self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13800,7 +14342,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13840,7 +14382,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13860,7 +14402,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13901,7 +14443,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13923,7 +14465,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -13964,7 +14506,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13986,7 +14528,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14027,7 +14569,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14048,7 +14590,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14089,7 +14631,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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 self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14111,7 +14653,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14152,7 +14694,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14174,7 +14716,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14215,7 +14757,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14237,7 +14779,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14278,7 +14820,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14298,7 +14840,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14340,7 +14882,7 @@ new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14361,7 +14903,7 @@ new MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14403,7 +14945,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14424,7 +14966,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14465,7 +15007,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14487,7 +15029,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14528,7 +15070,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14550,7 +15092,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14591,7 +15133,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14612,7 +15154,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14653,7 +15195,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14675,7 +15217,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14716,7 +15258,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14738,7 +15280,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14779,7 +15321,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14800,7 +15342,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14842,7 +15384,7 @@ new MTRPowerSourceActiveBatteryFaultsListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14864,7 +15406,7 @@ new MTRPowerSourceActiveBatteryFaultsListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceActiveBatteryFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14906,7 +15448,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14928,7 +15470,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -14969,7 +15511,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14991,7 +15533,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15032,7 +15574,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15054,7 +15596,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15095,7 +15637,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15117,7 +15659,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15158,7 +15700,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15180,7 +15722,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15221,7 +15763,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15242,7 +15784,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15283,7 +15825,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15304,7 +15846,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15345,7 +15887,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15366,7 +15908,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15407,7 +15949,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15429,7 +15971,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15470,7 +16012,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15492,7 +16034,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15533,7 +16075,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15555,7 +16097,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15597,7 +16139,7 @@ new MTRPowerSourceActiveBatteryChargeFaultsListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15619,7 +16161,7 @@ new MTRPowerSourceActiveBatteryChargeFaultsListAttributeCallbackSubscriptionBrid 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceActiveBatteryChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15662,7 +16204,7 @@ new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15684,7 +16226,7 @@ new MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15727,7 +16269,7 @@ new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15749,7 +16291,7 @@ new MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15792,7 +16334,7 @@ new MTRPowerSourceAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15812,7 +16354,7 @@ new MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15854,7 +16396,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15874,7 +16416,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15914,7 +16456,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15935,7 +16477,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -15969,11 +16511,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRGeneralCommissioning -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::GeneralCommissioningCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::GeneralCommissioningCluster **)cppClusterSlot { return &_cppCluster; } @@ -15997,7 +16568,7 @@ new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -16023,7 +16594,7 @@ new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -16053,7 +16624,7 @@ new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge( auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -16065,7 +16636,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16096,7 +16667,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -16117,7 +16688,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16158,7 +16729,7 @@ new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16181,7 +16752,7 @@ new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscrip 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16226,7 +16797,7 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16247,7 +16818,7 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16291,7 +16862,7 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16312,7 +16883,7 @@ new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16355,7 +16926,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16377,7 +16948,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16419,7 +16990,7 @@ new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16441,7 +17012,7 @@ new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscription 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16484,7 +17055,7 @@ new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16506,7 +17077,7 @@ new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionB 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16549,7 +17120,7 @@ new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16569,7 +17140,7 @@ new MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16611,7 +17182,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16631,7 +17202,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16671,7 +17242,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16692,7 +17263,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16726,11 +17297,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRNetworkCommissioning -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::NetworkCommissioningCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::NetworkCommissioningCluster **)cppClusterSlot { return &_cppCluster; } @@ -16767,7 +17367,7 @@ new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -16795,7 +17395,7 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -16822,7 +17422,7 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -16849,7 +17449,7 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -16876,7 +17476,7 @@ new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -16904,7 +17504,7 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -16916,7 +17516,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16936,7 +17536,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -16977,7 +17577,7 @@ new MTRNetworkCommissioningNetworksListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16997,7 +17597,7 @@ new MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17038,7 +17638,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17059,7 +17659,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17100,7 +17700,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17122,7 +17722,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17163,7 +17763,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17194,7 +17794,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -17216,7 +17816,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17259,7 +17859,7 @@ new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCal 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); }); } @@ -17282,7 +17882,7 @@ new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCal auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -17328,7 +17928,7 @@ new MTRNullableOctetStringAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17348,7 +17948,7 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17390,7 +17990,7 @@ new MTRNullableInt32sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17412,7 +18012,7 @@ new MTRNullableInt32sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17454,7 +18054,7 @@ new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17476,7 +18076,7 @@ new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscription 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17519,7 +18119,7 @@ new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17541,7 +18141,7 @@ new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionB 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17584,7 +18184,7 @@ new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17604,7 +18204,7 @@ new MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17646,7 +18246,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17666,7 +18266,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17706,7 +18306,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17727,7 +18327,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17761,11 +18361,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRDiagnosticLogs -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::DiagnosticLogsCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::DiagnosticLogsCluster **)cppClusterSlot { return &_cppCluster; } @@ -17791,7 +18420,7 @@ new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -17804,7 +18433,7 @@ new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17826,7 +18455,7 @@ new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17869,7 +18498,7 @@ new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17891,7 +18520,7 @@ new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17934,7 +18563,7 @@ new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17954,7 +18583,7 @@ new MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -17996,7 +18625,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18016,7 +18645,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18056,7 +18685,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18077,7 +18706,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18111,11 +18740,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRGeneralDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::GeneralDiagnosticsCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::GeneralDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -18142,7 +18800,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -18155,7 +18813,7 @@ new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18176,7 +18834,7 @@ new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18218,7 +18876,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18238,7 +18896,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18278,7 +18936,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18298,7 +18956,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18338,7 +18996,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18360,7 +19018,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18401,7 +19059,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18421,7 +19079,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18463,7 +19121,7 @@ new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18485,7 +19143,7 @@ new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18528,7 +19186,7 @@ new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18549,7 +19207,7 @@ new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18592,7 +19250,7 @@ new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18614,7 +19272,7 @@ new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18656,7 +19314,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::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); }); } @@ -18678,7 +19336,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18720,7 +19378,7 @@ new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18742,7 +19400,7 @@ new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18785,7 +19443,7 @@ new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18807,7 +19465,7 @@ new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18850,7 +19508,7 @@ new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18870,7 +19528,7 @@ new MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18912,7 +19570,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18932,7 +19590,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -18972,7 +19630,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18993,7 +19651,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19027,11 +19685,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRSoftwareDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::SoftwareDiagnosticsCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::SoftwareDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -19060,7 +19747,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -19073,7 +19760,7 @@ new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19093,7 +19780,7 @@ new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19135,7 +19822,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19156,7 +19843,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19197,7 +19884,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19218,7 +19905,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19259,7 +19946,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19281,7 +19968,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19323,7 +20010,7 @@ new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19345,7 +20032,7 @@ new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionB 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19388,7 +20075,7 @@ new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19410,7 +20097,7 @@ new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19453,7 +20140,7 @@ new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19473,7 +20160,7 @@ new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19515,7 +20202,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19535,7 +20222,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19575,7 +20262,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19596,7 +20283,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19630,11 +20317,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRThreadNetworkDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ThreadNetworkDiagnosticsCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ThreadNetworkDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -19663,7 +20379,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -19675,7 +20391,7 @@ new MTRNullableInt16uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::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); }); } @@ -19695,7 +20411,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19736,7 +20452,7 @@ new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::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); }); } @@ -19756,7 +20472,7 @@ new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscr using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19800,7 +20516,7 @@ new MTRNullableCharStringAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::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); }); } @@ -19820,7 +20536,7 @@ new MTRNullableCharStringAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19861,7 +20577,7 @@ new MTRNullableInt16uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::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); }); } @@ -19881,7 +20597,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19922,7 +20638,7 @@ new MTRNullableInt64uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::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); }); } @@ -19943,7 +20659,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -19985,7 +20701,7 @@ new MTRNullableOctetStringAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::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); }); } @@ -20006,7 +20722,7 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20047,7 +20763,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::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); }); } @@ -20067,7 +20783,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20109,7 +20825,7 @@ new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::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); }); } @@ -20130,7 +20846,7 @@ new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptio using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20173,7 +20889,7 @@ new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::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); }); } @@ -20194,7 +20910,7 @@ new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBr using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20237,7 +20953,7 @@ new MTRNullableInt32uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::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); }); } @@ -20257,7 +20973,7 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20299,7 +21015,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::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); }); } @@ -20319,7 +21035,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20360,7 +21076,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::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); }); } @@ -20380,7 +21096,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20422,7 +21138,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::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); }); } @@ -20443,7 +21159,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20485,7 +21201,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::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); }); } @@ -20506,7 +21222,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20547,7 +21263,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::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); }); } @@ -20568,7 +21284,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20609,7 +21325,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::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); }); } @@ -20630,7 +21346,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20671,7 +21387,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::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); }); } @@ -20692,7 +21408,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20733,7 +21449,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::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); }); } @@ -20754,7 +21470,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20795,7 +21511,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::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); }); } @@ -20816,7 +21532,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20857,7 +21573,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::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); }); } @@ -20879,7 +21595,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20920,7 +21636,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::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); }); } @@ -20942,7 +21658,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -20983,7 +21699,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::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); }); } @@ -21004,7 +21720,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21045,7 +21761,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::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); }); } @@ -21065,7 +21781,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21106,7 +21822,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::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); }); } @@ -21127,7 +21843,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21168,7 +21884,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::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); }); } @@ -21189,7 +21905,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21230,7 +21946,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::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); }); } @@ -21252,7 +21968,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21293,7 +22009,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::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); }); } @@ -21313,7 +22029,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21354,7 +22070,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::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); }); } @@ -21376,7 +22092,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21417,7 +22133,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::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); }); } @@ -21437,7 +22153,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21478,7 +22194,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::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); }); } @@ -21499,7 +22215,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21540,7 +22256,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::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); }); } @@ -21561,7 +22277,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21602,7 +22318,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::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); }); } @@ -21624,7 +22340,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21665,7 +22381,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::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); }); } @@ -21685,7 +22401,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21726,7 +22442,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::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); }); } @@ -21746,7 +22462,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21787,7 +22503,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::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); }); } @@ -21809,7 +22525,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21850,7 +22566,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::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); }); } @@ -21872,7 +22588,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21913,7 +22629,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::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); }); } @@ -21934,7 +22650,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -21975,7 +22691,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::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); }); } @@ -21996,7 +22712,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22037,7 +22753,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::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); }); } @@ -22059,7 +22775,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22100,7 +22816,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::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); }); } @@ -22120,7 +22836,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22161,7 +22877,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::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); }); } @@ -22182,7 +22898,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22223,7 +22939,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::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); }); } @@ -22244,7 +22960,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22285,7 +23001,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::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); }); } @@ -22305,7 +23021,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22346,7 +23062,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::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); }); } @@ -22367,7 +23083,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22408,7 +23124,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::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); }); } @@ -22429,7 +23145,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22470,7 +23186,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::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); }); } @@ -22492,7 +23208,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22533,7 +23249,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::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); }); } @@ -22553,7 +23269,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22594,7 +23310,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::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); }); } @@ -22616,7 +23332,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22657,7 +23373,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::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); }); } @@ -22679,7 +23395,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22720,7 +23436,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::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); }); } @@ -22741,7 +23457,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22782,7 +23498,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::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); }); } @@ -22803,7 +23519,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22844,7 +23560,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::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); }); } @@ -22866,7 +23582,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22907,7 +23623,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::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); }); } @@ -22929,7 +23645,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -22970,7 +23686,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::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); }); } @@ -22991,7 +23707,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23032,7 +23748,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::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); }); } @@ -23053,7 +23769,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23094,7 +23810,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::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); }); } @@ -23115,7 +23831,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23157,7 +23873,7 @@ new MTRNullableInt64uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::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); }); } @@ -23178,7 +23894,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23220,7 +23936,7 @@ new MTRNullableInt64uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::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); }); } @@ -23241,7 +23957,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23282,7 +23998,7 @@ new MTRNullableInt32uAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::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); }); } @@ -23302,7 +24018,7 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23343,7 +24059,7 @@ new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::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); }); } @@ -23365,7 +24081,7 @@ new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscription using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23408,7 +24124,7 @@ new MTRNullableOctetStringAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelMask::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); }); } @@ -23428,7 +24144,7 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelMask::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23471,7 +24187,7 @@ new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallba 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); }); } @@ -23497,7 +24213,7 @@ new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallba auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -23547,7 +24263,7 @@ new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridg 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); }); } @@ -23570,7 +24286,7 @@ new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubsc auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -23615,7 +24331,7 @@ new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::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); }); } @@ -23637,7 +24353,7 @@ new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscrip using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23681,7 +24397,7 @@ new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::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); }); } @@ -23703,7 +24419,7 @@ new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23747,7 +24463,7 @@ new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::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); }); } @@ -23767,7 +24483,7 @@ new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBri using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23809,7 +24525,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::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); }); } @@ -23829,7 +24545,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23869,7 +24585,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::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); }); } @@ -23890,7 +24606,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -23924,11 +24640,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRWiFiNetworkDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::WiFiNetworkDiagnosticsCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::WiFiNetworkDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -23957,7 +24702,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -23969,7 +24714,7 @@ new MTRNullableOctetStringAttributeCallbackBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::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); }); } @@ -23989,7 +24734,7 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24030,7 +24775,7 @@ new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::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); }); } @@ -24050,7 +24795,7 @@ new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscri using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24095,7 +24840,7 @@ new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBrid 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); }); } @@ -24116,7 +24861,7 @@ new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubs auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -24161,7 +24906,7 @@ new MTRNullableInt16uAttributeCallbackBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::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); }); } @@ -24182,7 +24927,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24223,7 +24968,7 @@ new MTRNullableInt8sAttributeCallbackBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::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); }); } @@ -24243,7 +24988,7 @@ new MTRNullableInt8sAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24283,7 +25028,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::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); }); } @@ -24304,7 +25049,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24345,7 +25090,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::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); }); } @@ -24366,7 +25111,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24407,7 +25152,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::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); }); } @@ -24429,7 +25174,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24470,7 +25215,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::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); }); } @@ -24492,7 +25237,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24533,7 +25278,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::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); }); } @@ -24555,7 +25300,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24596,7 +25341,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::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); }); } @@ -24618,7 +25363,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24659,7 +25404,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::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); }); } @@ -24680,7 +25425,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24721,7 +25466,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::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); }); } @@ -24741,7 +25486,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24783,7 +25528,7 @@ new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::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); }); } @@ -24805,7 +25550,7 @@ new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscripti using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24848,7 +25593,7 @@ new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::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); }); } @@ -24870,7 +25615,7 @@ new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptio using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24913,7 +25658,7 @@ new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::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); }); } @@ -24933,7 +25678,7 @@ new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridg using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -24975,7 +25720,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::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); }); } @@ -24995,7 +25740,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25035,7 +25780,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::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); }); } @@ -25056,7 +25801,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25090,11 +25835,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTREthernetNetworkDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::EthernetNetworkDiagnosticsCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::EthernetNetworkDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -25123,7 +25897,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -25136,7 +25910,7 @@ new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBrid 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); }); } @@ -25157,7 +25931,7 @@ new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubs auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -25201,7 +25975,7 @@ new MTRNullableBooleanAttributeCallbackBridge( using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::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); }); } @@ -25221,7 +25995,7 @@ new MTRNullableBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25261,7 +26035,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25282,7 +26056,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25323,7 +26097,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25344,7 +26118,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25385,7 +26159,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25405,7 +26179,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25445,7 +26219,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25466,7 +26240,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25507,7 +26281,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25527,7 +26301,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25569,7 +26343,7 @@ new MTRNullableBooleanAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25590,7 +26364,7 @@ new MTRNullableBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25631,7 +26405,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25652,7 +26426,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25694,7 +26468,7 @@ new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25716,7 +26490,7 @@ new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25760,7 +26534,7 @@ new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25782,7 +26556,7 @@ new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25826,7 +26600,7 @@ new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25846,7 +26620,7 @@ new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionB 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25888,7 +26662,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25908,7 +26682,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -25948,7 +26722,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -25969,7 +26743,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26003,11 +26777,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRBridgedDeviceBasic -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::BridgedDeviceBasicCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::BridgedDeviceBasicCluster **)cppClusterSlot { return &_cppCluster; } @@ -26019,7 +26822,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26039,7 +26842,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26079,7 +26882,7 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26099,7 +26902,7 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26139,7 +26942,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26159,7 +26962,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26200,7 +27003,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26231,7 +27034,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -26252,7 +27055,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26292,7 +27095,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26313,7 +27116,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26354,7 +27157,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26376,7 +27179,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26417,7 +27220,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26438,7 +27241,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26479,7 +27282,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26501,7 +27304,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26542,7 +27345,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26563,7 +27366,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26604,7 +27407,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26624,7 +27427,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26664,7 +27467,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26684,7 +27487,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26724,7 +27527,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26744,7 +27547,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26785,7 +27588,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26805,7 +27608,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26846,7 +27649,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26866,7 +27669,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26906,7 +27709,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26926,7 +27729,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -26967,7 +27770,7 @@ new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -26989,7 +27792,7 @@ new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27032,7 +27835,7 @@ new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27054,7 +27857,7 @@ new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27097,7 +27900,7 @@ new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27117,7 +27920,7 @@ new MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27159,7 +27962,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27179,7 +27982,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27219,7 +28022,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27240,7 +28043,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27274,11 +28077,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRSwitch -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::SwitchCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::SwitchCluster **)cppClusterSlot { return &_cppCluster; } @@ -27290,7 +28122,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27311,7 +28143,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27352,7 +28184,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27373,7 +28205,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27414,7 +28246,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27435,7 +28267,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27477,7 +28309,7 @@ new MTRSwitchGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27499,7 +28331,7 @@ new MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27542,7 +28374,7 @@ new MTRSwitchAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27564,7 +28396,7 @@ new MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27607,7 +28439,7 @@ new MTRSwitchAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27627,7 +28459,7 @@ new MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27668,7 +28500,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27688,7 +28520,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27728,7 +28560,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -27749,7 +28581,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27783,11 +28615,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRAdministratorCommissioning -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::AdministratorCommissioningCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::AdministratorCommissioningCluster **)cppClusterSlot { return &_cppCluster; } @@ -27820,7 +28681,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -27849,7 +28710,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -27881,7 +28742,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -27893,7 +28754,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::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); }); } @@ -27913,7 +28774,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -27954,7 +28815,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::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); }); } @@ -27975,7 +28836,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28016,7 +28877,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::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); }); } @@ -28037,7 +28898,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28079,7 +28940,7 @@ new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::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); }); } @@ -28101,7 +28962,7 @@ new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscr using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28145,7 +29006,7 @@ new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::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); }); } @@ -28167,7 +29028,7 @@ new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscri using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28211,7 +29072,7 @@ new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge( using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::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); }); } @@ -28231,7 +29092,7 @@ new MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionB using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28273,7 +29134,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -28293,7 +29154,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28333,7 +29194,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::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); }); } @@ -28354,7 +29215,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28388,11 +29249,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTROperationalCredentials -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::OperationalCredentialsCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::OperationalCredentialsCluster **)cppClusterSlot { return &_cppCluster; } @@ -28415,7 +29305,7 @@ new MTROperationalCredentialsClusterAttestationResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -28438,7 +29328,7 @@ new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -28465,7 +29355,7 @@ new MTROperationalCredentialsClusterCSRResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -28496,7 +29386,7 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -28523,7 +29413,7 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -28546,7 +29436,7 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -28569,7 +29459,7 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -28595,7 +29485,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -28608,7 +29498,7 @@ new MTROperationalCredentialsNOCsListAttributeCallbackBridge( 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, + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } @@ -28629,7 +29519,7 @@ new MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28671,7 +29561,7 @@ new MTROperationalCredentialsFabricsListAttributeCallbackBridge( 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, + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } @@ -28692,7 +29582,7 @@ new MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28733,7 +29623,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -28754,7 +29644,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28795,7 +29685,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -28817,7 +29707,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28859,7 +29749,7 @@ new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -28881,7 +29771,7 @@ new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28924,7 +29814,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -28945,7 +29835,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -28987,7 +29877,7 @@ new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29009,7 +29899,7 @@ new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscripti 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29052,7 +29942,7 @@ new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29074,7 +29964,7 @@ new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptio 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29117,7 +30007,7 @@ new MTROperationalCredentialsAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29137,7 +30027,7 @@ new MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29179,7 +30069,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29199,7 +30089,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29239,7 +30129,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29260,7 +30150,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29294,11 +30184,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRGroupKeyManagement -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::GroupKeyManagementCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::GroupKeyManagementCluster **)cppClusterSlot { return &_cppCluster; } @@ -29363,7 +30282,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -29386,7 +30305,7 @@ new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -29412,7 +30331,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -29456,7 +30375,7 @@ new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -29469,7 +30388,7 @@ new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( 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]); }); } @@ -29524,7 +30443,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -29545,7 +30464,7 @@ new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29587,7 +30506,7 @@ new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge( 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]); }); } @@ -29608,7 +30527,7 @@ new MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29649,7 +30568,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29670,7 +30589,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29711,7 +30630,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29733,7 +30652,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29775,7 +30694,7 @@ new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29797,7 +30716,7 @@ new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29840,7 +30759,7 @@ new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29862,7 +30781,7 @@ new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29905,7 +30824,7 @@ new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29925,7 +30844,7 @@ new MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -29967,7 +30886,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -29987,7 +30906,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30027,7 +30946,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30048,7 +30967,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30082,11 +31001,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRFixedLabel -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::FixedLabelCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::FixedLabelCluster **)cppClusterSlot { return &_cppCluster; } @@ -30099,7 +31047,7 @@ new MTRFixedLabelLabelListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30119,7 +31067,7 @@ new MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30160,7 +31108,7 @@ new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30182,7 +31130,7 @@ new MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30225,7 +31173,7 @@ new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30247,7 +31195,7 @@ new MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30290,7 +31238,7 @@ new MTRFixedLabelAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30310,7 +31258,7 @@ new MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30352,7 +31300,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30372,7 +31320,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30412,7 +31360,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30433,7 +31381,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30467,11 +31415,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRUserLabel -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::UserLabelCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::UserLabelCluster **)cppClusterSlot { return &_cppCluster; } @@ -30484,7 +31461,7 @@ new MTRUserLabelLabelListListAttributeCallbackBridge( using TypeInfo = UserLabel::Attributes::LabelList::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); }); } @@ -30537,7 +31514,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -30558,7 +31535,7 @@ new MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge( using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30599,7 +31576,7 @@ new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = UserLabel::Attributes::GeneratedCommandList::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); }); } @@ -30621,7 +31598,7 @@ new MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30664,7 +31641,7 @@ new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = UserLabel::Attributes::AcceptedCommandList::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); }); } @@ -30686,7 +31663,7 @@ new MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30729,7 +31706,7 @@ new MTRUserLabelAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30749,7 +31726,7 @@ new MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30791,7 +31768,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30811,7 +31788,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30851,7 +31828,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = UserLabel::Attributes::ClusterRevision::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); }); } @@ -30872,7 +31849,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30906,11 +31883,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRBooleanState -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::BooleanStateCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::BooleanStateCluster **)cppClusterSlot { return &_cppCluster; } @@ -30922,7 +31928,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -30942,7 +31948,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -30983,7 +31989,7 @@ new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31005,7 +32011,7 @@ new MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31048,7 +32054,7 @@ new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31070,7 +32076,7 @@ new MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31113,7 +32119,7 @@ new MTRBooleanStateAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31133,7 +32139,7 @@ new MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31175,7 +32181,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31195,7 +32201,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31235,7 +32241,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31256,7 +32262,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31290,11 +32296,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRModeSelect -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ModeSelectCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ModeSelectCluster **)cppClusterSlot { return &_cppCluster; } @@ -31320,7 +32355,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -31332,7 +32367,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31352,7 +32387,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31394,7 +32429,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31415,7 +32450,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31457,7 +32492,7 @@ new MTRModeSelectSupportedModesListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31478,7 +32513,7 @@ new MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31520,7 +32555,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31540,7 +32575,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31582,7 +32617,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31618,7 +32653,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -31639,7 +32674,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31680,7 +32715,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31716,7 +32751,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -31737,7 +32772,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31778,7 +32813,7 @@ new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31800,7 +32835,7 @@ new MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31843,7 +32878,7 @@ new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31865,7 +32900,7 @@ new MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31908,7 +32943,7 @@ new MTRModeSelectAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31928,7 +32963,7 @@ new MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -31970,7 +33005,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -31990,7 +33025,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -32030,7 +33065,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -32051,7 +33086,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -32085,11 +33120,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRDoorLock -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::DoorLockCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::DoorLockCluster **)cppClusterSlot { return &_cppCluster; } @@ -32123,7 +33187,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32157,7 +33221,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32190,7 +33254,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32222,7 +33286,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32246,7 +33310,7 @@ new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32273,7 +33337,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32302,7 +33366,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32326,7 +33390,7 @@ new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32353,7 +33417,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32383,7 +33447,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32406,7 +33470,7 @@ new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32432,7 +33496,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32492,7 +33556,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32515,7 +33579,7 @@ new MTRDoorLockClusterGetUserResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32543,7 +33607,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32592,7 +33656,7 @@ new MTRDoorLockClusterSetCredentialResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32617,7 +33681,7 @@ new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32653,7 +33717,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -32666,7 +33730,7 @@ new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -32686,7 +33750,7 @@ new MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -32728,7 +33792,7 @@ new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -32748,7 +33812,7 @@ new MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -32789,7 +33853,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -32810,7 +33874,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -32852,7 +33916,7 @@ new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -32872,7 +33936,7 @@ new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -32913,7 +33977,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -32944,7 +34008,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -32966,7 +34030,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33007,7 +34071,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33038,7 +34102,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -33060,7 +34124,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33101,7 +34165,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33132,7 +34196,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -33153,7 +34217,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33193,7 +34257,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33215,7 +34279,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33256,7 +34320,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33278,7 +34342,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33319,7 +34383,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33341,7 +34405,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33382,7 +34446,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33404,7 +34468,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33446,7 +34510,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33468,7 +34532,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33510,7 +34574,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33532,7 +34596,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33573,7 +34637,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33594,7 +34658,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33635,7 +34699,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33656,7 +34720,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33697,7 +34761,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33718,7 +34782,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33759,7 +34823,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33780,7 +34844,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33822,7 +34886,7 @@ new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33844,7 +34908,7 @@ new MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33886,7 +34950,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::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); }); } @@ -33908,7 +34972,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -33949,7 +35013,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -33980,7 +35044,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34001,7 +35065,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34041,7 +35105,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34072,7 +35136,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34093,7 +35157,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34134,7 +35198,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34165,7 +35229,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34187,7 +35251,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34228,7 +35292,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34259,7 +35323,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34280,7 +35344,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34322,7 +35386,7 @@ new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34353,7 +35417,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34375,7 +35439,7 @@ new MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34418,7 +35482,7 @@ new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34440,7 +35504,7 @@ new MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34483,7 +35547,7 @@ new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34505,7 +35569,7 @@ new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34547,7 +35611,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34579,7 +35643,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34602,7 +35666,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34643,7 +35707,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34675,7 +35739,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34698,7 +35762,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34739,7 +35803,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34771,7 +35835,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34794,7 +35858,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34835,7 +35899,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34869,7 +35933,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34892,7 +35956,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -34934,7 +35998,7 @@ new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34968,7 +36032,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -34991,7 +36055,7 @@ new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35033,7 +36097,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35064,7 +36128,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -35087,7 +36151,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35128,7 +36192,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35162,7 +36226,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -35185,7 +36249,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35226,7 +36290,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35257,7 +36321,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -35279,7 +36343,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35320,7 +36384,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35354,7 +36418,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -35377,7 +36441,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35418,7 +36482,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35449,7 +36513,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -35472,7 +36536,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35514,7 +36578,7 @@ new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35536,7 +36600,7 @@ new MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35579,7 +36643,7 @@ new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35601,7 +36665,7 @@ new MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35644,7 +36708,7 @@ new MTRDoorLockAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35664,7 +36728,7 @@ new MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35706,7 +36770,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35726,7 +36790,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35766,7 +36830,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -35787,7 +36851,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -35821,11 +36885,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRWindowCovering -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::WindowCoveringCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::WindowCoveringCluster **)cppClusterSlot { return &_cppCluster; } @@ -35854,7 +36947,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -35883,7 +36976,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -35912,7 +37005,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -35938,7 +37031,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -35964,7 +37057,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -35990,7 +37083,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -36016,7 +37109,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -36028,7 +37121,7 @@ new MTRWindowCoveringClusterTypeAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::Type::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); }); } @@ -36048,7 +37141,7 @@ new MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36089,7 +37182,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -36111,7 +37204,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36152,7 +37245,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -36174,7 +37267,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36216,7 +37309,7 @@ new MTRNullableInt16uAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::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); }); } @@ -36238,7 +37331,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36280,7 +37373,7 @@ new MTRNullableInt16uAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::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); }); } @@ -36302,7 +37395,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36343,7 +37436,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -36365,7 +37458,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36406,7 +37499,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -36428,7 +37521,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36470,7 +37563,7 @@ new MTRWindowCoveringConfigStatusAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::ConfigStatus::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); }); } @@ -36490,7 +37583,7 @@ new MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36533,7 +37626,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::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); }); } @@ -36555,7 +37648,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36597,7 +37690,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::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); }); } @@ -36619,7 +37712,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36661,7 +37754,7 @@ new MTRWindowCoveringOperationalStatusAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::OperationalStatus::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); }); } @@ -36682,7 +37775,7 @@ new MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36725,7 +37818,7 @@ new MTRNullableInt16uAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::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); }); } @@ -36747,7 +37840,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36789,7 +37882,7 @@ new MTRNullableInt16uAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::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); }); } @@ -36811,7 +37904,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36853,7 +37946,7 @@ new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::EndProductType::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); }); } @@ -36874,7 +37967,7 @@ new MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36917,7 +38010,7 @@ new MTRNullableInt16uAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::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); }); } @@ -36939,7 +38032,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -36981,7 +38074,7 @@ new MTRNullableInt16uAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::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); }); } @@ -37003,7 +38096,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37044,7 +38137,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::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); }); } @@ -37066,7 +38159,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37107,7 +38200,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::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); }); } @@ -37129,7 +38222,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37170,7 +38263,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::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); }); } @@ -37192,7 +38285,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37233,7 +38326,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::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); }); } @@ -37255,7 +38348,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37296,7 +38389,7 @@ new MTRWindowCoveringModeAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::Mode::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); }); } @@ -37327,7 +38420,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -37348,7 +38441,7 @@ new MTRWindowCoveringModeAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37389,7 +38482,7 @@ new MTRWindowCoveringSafetyStatusAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::SafetyStatus::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); }); } @@ -37409,7 +38502,7 @@ new MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37452,7 +38545,7 @@ new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::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); }); } @@ -37474,7 +38567,7 @@ new MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37517,7 +38610,7 @@ new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::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); }); } @@ -37539,7 +38632,7 @@ new MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37582,7 +38675,7 @@ new MTRWindowCoveringAttributeListListAttributeCallbackBridge( using TypeInfo = WindowCovering::Attributes::AttributeList::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); }); } @@ -37602,7 +38695,7 @@ new MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37644,7 +38737,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WindowCovering::Attributes::FeatureMap::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); }); } @@ -37664,7 +38757,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37704,7 +38797,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WindowCovering::Attributes::ClusterRevision::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); }); } @@ -37725,7 +38818,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37759,11 +38852,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRBarrierControl -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::BarrierControlCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::BarrierControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -37789,7 +38911,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -37818,7 +38940,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -37830,7 +38952,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = BarrierControl::Attributes::BarrierMovingState::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); }); } @@ -37851,7 +38973,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37892,7 +39014,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::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); }); } @@ -37914,7 +39036,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -37955,7 +39077,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::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); }); } @@ -37977,7 +39099,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38018,7 +39140,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38049,7 +39171,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -38071,7 +39193,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38112,7 +39234,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38143,7 +39265,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -38165,7 +39287,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38206,7 +39328,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38240,7 +39362,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -38263,7 +39385,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38304,7 +39426,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38338,7 +39460,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -38361,7 +39483,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38402,7 +39524,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38433,7 +39555,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -38455,7 +39577,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38496,7 +39618,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38527,7 +39649,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -38549,7 +39671,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38590,7 +39712,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38611,7 +39733,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38653,7 +39775,7 @@ new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38675,7 +39797,7 @@ new MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38718,7 +39840,7 @@ new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38740,7 +39862,7 @@ new MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38783,7 +39905,7 @@ new MTRBarrierControlAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38803,7 +39925,7 @@ new MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38845,7 +39967,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38865,7 +39987,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38905,7 +40027,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38926,7 +40048,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -38960,11 +40082,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRPumpConfigurationAndControl -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::PumpConfigurationAndControlCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::PumpConfigurationAndControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -38977,7 +40128,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -38997,7 +40148,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39039,7 +40190,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39059,7 +40210,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39099,7 +40250,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39119,7 +40270,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39160,7 +40311,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39181,7 +40332,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39223,7 +40374,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39244,7 +40395,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39286,7 +40437,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39307,7 +40458,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39349,7 +40500,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39370,7 +40521,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39412,7 +40563,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39433,7 +40584,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39475,7 +40626,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39496,7 +40647,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39538,7 +40689,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39558,7 +40709,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39600,7 +40751,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39620,7 +40771,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39662,7 +40813,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39682,7 +40833,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39724,7 +40875,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39744,7 +40895,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39786,7 +40937,7 @@ new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39806,7 +40957,7 @@ new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39849,7 +41000,7 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridg 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); }); } @@ -39872,7 +41023,7 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubsc auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -39917,7 +41068,7 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -39939,7 +41090,7 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -39983,7 +41134,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40003,7 +41154,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40043,7 +41194,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40063,7 +41214,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40104,7 +41255,7 @@ new MTRNullableInt32uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40141,7 +41292,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -40164,7 +41315,7 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40205,7 +41356,7 @@ new MTRNullableInt32uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40225,7 +41376,7 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40266,7 +41417,7 @@ new MTRNullableInt32uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40305,7 +41456,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -40328,7 +41479,7 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40371,7 +41522,7 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridg 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); }); } @@ -40402,7 +41553,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -40425,7 +41576,7 @@ new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubsc auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -40470,7 +41621,7 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40501,7 +41652,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -40522,7 +41673,7 @@ new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscri 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40567,7 +41718,7 @@ new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridg 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); }); } @@ -40590,7 +41741,7 @@ new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubsc auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -40635,7 +41786,7 @@ new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40657,7 +41808,7 @@ new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40701,7 +41852,7 @@ new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40721,7 +41872,7 @@ new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscription 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40763,7 +41914,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40783,7 +41934,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40823,7 +41974,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -40844,7 +41995,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -40878,11 +42029,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRThermostat -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ThermostatCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ThermostatCluster **)cppClusterSlot { return &_cppCluster; } @@ -40909,7 +42089,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -40973,7 +42153,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -40999,7 +42179,7 @@ new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -41028,7 +42208,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -41041,7 +42221,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41062,7 +42242,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41104,7 +42284,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41125,7 +42305,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41166,7 +42346,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41186,7 +42366,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41226,7 +42406,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41248,7 +42428,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41289,7 +42469,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41311,7 +42491,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41352,7 +42532,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41374,7 +42554,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41415,7 +42595,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41437,7 +42617,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41478,7 +42658,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41499,7 +42679,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41540,7 +42720,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41561,7 +42741,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41602,7 +42782,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41636,7 +42816,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -41659,7 +42839,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41700,7 +42880,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41734,7 +42914,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -41757,7 +42937,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41798,7 +42978,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41832,7 +43012,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -41855,7 +43035,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41896,7 +43076,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -41930,7 +43110,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -41953,7 +43133,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -41994,7 +43174,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42028,7 +43208,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42051,7 +43231,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42092,7 +43272,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42126,7 +43306,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42149,7 +43329,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42190,7 +43370,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42221,7 +43401,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42244,7 +43424,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42285,7 +43465,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42316,7 +43496,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42339,7 +43519,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42380,7 +43560,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42411,7 +43591,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42434,7 +43614,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42475,7 +43655,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42506,7 +43686,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42529,7 +43709,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42570,7 +43750,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42601,7 +43781,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42624,7 +43804,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42665,7 +43845,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42696,7 +43876,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42718,7 +43898,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42760,7 +43940,7 @@ new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42794,7 +43974,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42817,7 +43997,7 @@ new MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42859,7 +44039,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42890,7 +44070,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -42911,7 +44091,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -42951,7 +44131,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -42973,7 +44153,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43014,7 +44194,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43034,7 +44214,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43075,7 +44255,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43097,7 +44277,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43138,7 +44318,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43160,7 +44340,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43201,7 +44381,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43235,7 +44415,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -43258,7 +44438,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43300,7 +44480,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43339,7 +44519,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -43362,7 +44542,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43403,7 +44583,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43437,7 +44617,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -43460,7 +44640,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43501,7 +44681,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43523,7 +44703,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43564,7 +44744,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43586,7 +44766,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43628,7 +44808,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43650,7 +44830,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43691,7 +44871,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -43713,7 +44893,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43755,7 +44935,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = Thermostat::Attributes::OccupiedSetback::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); }); } @@ -43791,7 +44971,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -43813,7 +44993,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43855,7 +45035,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::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); }); } @@ -43876,7 +45056,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43918,7 +45098,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::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); }); } @@ -43939,7 +45119,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -43981,7 +45161,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::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); }); } @@ -44017,7 +45197,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -44039,7 +45219,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44081,7 +45261,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::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); }); } @@ -44103,7 +45283,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44145,7 +45325,7 @@ new MTRNullableInt8uAttributeCallbackBridge( using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::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); }); } @@ -44167,7 +45347,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44208,7 +45388,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::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); }); } @@ -44239,7 +45419,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -44261,7 +45441,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44301,7 +45481,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -44332,7 +45512,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -44353,7 +45533,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44393,7 +45573,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -44424,7 +45604,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -44445,7 +45625,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44485,7 +45665,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -44516,7 +45696,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -44538,7 +45718,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44579,7 +45759,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -44610,7 +45790,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -44632,7 +45812,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44673,7 +45853,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -44704,7 +45884,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -44725,7 +45905,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44766,7 +45946,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -44797,7 +45977,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -44819,7 +45999,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44861,7 +46041,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -44882,7 +46062,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -44923,7 +46103,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -44954,7 +46134,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -44976,7 +46156,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45018,7 +46198,7 @@ new MTRThermostatGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45040,7 +46220,7 @@ new MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45083,7 +46263,7 @@ new MTRThermostatAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45105,7 +46285,7 @@ new MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45148,7 +46328,7 @@ new MTRThermostatAttributeListListAttributeCallbackBridge( using TypeInfo = Thermostat::Attributes::AttributeList::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); }); } @@ -45168,7 +46348,7 @@ new MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45210,7 +46390,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = Thermostat::Attributes::FeatureMap::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); }); } @@ -45230,7 +46410,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45270,7 +46450,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = Thermostat::Attributes::ClusterRevision::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); }); } @@ -45291,7 +46471,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45325,11 +46505,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRFanControl -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::FanControlCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::FanControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -45341,7 +46550,7 @@ new MTRFanControlClusterFanModeTypeAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45372,7 +46581,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -45393,7 +46602,7 @@ new MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45435,7 +46644,7 @@ new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45466,7 +46675,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -45488,7 +46697,7 @@ new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45531,7 +46740,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45567,7 +46776,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -45589,7 +46798,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45630,7 +46839,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45651,7 +46860,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45692,7 +46901,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45712,7 +46921,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45753,7 +46962,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45789,7 +46998,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -45810,7 +47019,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45851,7 +47060,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45871,7 +47080,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45912,7 +47121,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -45932,7 +47141,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -45973,7 +47182,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -46004,7 +47213,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -46025,7 +47234,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46066,7 +47275,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -46086,7 +47295,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46127,7 +47336,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -46158,7 +47367,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -46179,7 +47388,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46221,7 +47430,7 @@ new MTRFanControlGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -46243,7 +47452,7 @@ new MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46286,7 +47495,7 @@ new MTRFanControlAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -46308,7 +47517,7 @@ new MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46351,7 +47560,7 @@ new MTRFanControlAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -46371,7 +47580,7 @@ new MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46413,7 +47622,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -46433,7 +47642,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46473,7 +47682,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -46494,7 +47703,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46528,11 +47737,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRThermostatUserInterfaceConfiguration -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ThermostatUserInterfaceConfigurationCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ThermostatUserInterfaceConfigurationCluster **)cppClusterSlot { return &_cppCluster; } @@ -46544,7 +47782,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::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); }); } @@ -46576,7 +47814,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -46599,7 +47837,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46640,7 +47878,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::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); }); } @@ -46671,7 +47909,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -46693,7 +47931,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46734,7 +47972,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::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); }); } @@ -46768,7 +48006,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -46791,7 +48029,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -46834,7 +48072,7 @@ new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCall 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); }); } @@ -46857,7 +48095,7 @@ new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCall auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -46904,7 +48142,7 @@ new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallb 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); }); } @@ -46927,7 +48165,7 @@ new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallb auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -46974,7 +48212,7 @@ new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBri 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); }); } @@ -46995,7 +48233,7 @@ new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSub auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -47039,7 +48277,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -47059,7 +48297,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -47099,7 +48337,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::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); }); } @@ -47120,7 +48358,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -47154,11 +48392,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRColorControl -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ColorControlCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ColorControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -47187,7 +48454,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47215,7 +48482,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47244,7 +48511,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47273,7 +48540,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47302,7 +48569,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47332,7 +48599,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47362,7 +48629,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47392,7 +48659,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47420,7 +48687,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47449,7 +48716,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47478,7 +48745,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47508,7 +48775,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47537,7 +48804,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47567,7 +48834,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47597,7 +48864,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47629,7 +48896,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47656,7 +48923,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47687,7 +48954,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47719,7 +48986,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -47731,7 +48998,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -47751,7 +49018,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -47791,7 +49058,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -47812,7 +49079,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -47853,7 +49120,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -47874,7 +49141,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -47915,7 +49182,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -47935,7 +49202,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -47975,7 +49242,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -47995,7 +49262,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48035,7 +49302,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48056,7 +49323,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48097,7 +49364,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48118,7 +49385,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48159,7 +49426,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48180,7 +49447,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48221,7 +49488,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48241,7 +49508,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48280,7 +49547,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = ColorControl::Attributes::Options::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); }); } @@ -48311,7 +49578,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -48332,7 +49599,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ColorControl::Attributes::Options::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48373,7 +49640,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48394,7 +49661,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48435,7 +49702,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48455,7 +49722,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48495,7 +49762,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48515,7 +49782,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48556,7 +49823,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48577,7 +49844,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48618,7 +49885,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48638,7 +49905,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48678,7 +49945,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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 self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48698,7 +49965,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48739,7 +50006,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48760,7 +50027,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48801,7 +50068,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48821,7 +50088,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48861,7 +50128,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48881,7 +50148,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48922,7 +50189,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -48943,7 +50210,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -48984,7 +50251,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49004,7 +50271,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49044,7 +50311,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49064,7 +50331,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49105,7 +50372,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49126,7 +50393,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49167,7 +50434,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49187,7 +50454,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49227,7 +50494,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49247,7 +50514,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49288,7 +50555,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49309,7 +50576,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49350,7 +50617,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49370,7 +50637,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49410,7 +50677,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49430,7 +50697,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49471,7 +50738,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49492,7 +50759,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49533,7 +50800,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49564,7 +50831,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -49585,7 +50852,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49626,7 +50893,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49657,7 +50924,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -49678,7 +50945,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49719,7 +50986,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49750,7 +51017,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -49771,7 +51038,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49812,7 +51079,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49843,7 +51110,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -49864,7 +51131,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -49906,7 +51173,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -49943,7 +51210,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -49966,7 +51233,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50007,7 +51274,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50038,7 +51305,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -50059,7 +51326,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50100,7 +51367,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50131,7 +51398,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -50152,7 +51419,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50194,7 +51461,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50231,7 +51498,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -50254,7 +51521,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50295,7 +51562,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50326,7 +51593,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -50347,7 +51614,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50388,7 +51655,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50419,7 +51686,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -50440,7 +51707,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50482,7 +51749,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50519,7 +51786,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -50542,7 +51809,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50583,7 +51850,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50604,7 +51871,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50645,7 +51912,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50666,7 +51933,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50707,7 +51974,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50728,7 +51995,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50769,7 +52036,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50790,7 +52057,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50831,7 +52098,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50852,7 +52119,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50893,7 +52160,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50915,7 +52182,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -50956,7 +52223,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -50978,7 +52245,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51019,7 +52286,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51040,7 +52307,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51081,7 +52348,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::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); }); } @@ -51103,7 +52370,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51144,7 +52411,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::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); }); } @@ -51166,7 +52433,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51207,7 +52474,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51229,7 +52496,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51270,7 +52537,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51304,7 +52571,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -51327,7 +52594,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51369,7 +52636,7 @@ new MTRColorControlGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51391,7 +52658,7 @@ new MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51434,7 +52701,7 @@ new MTRColorControlAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51456,7 +52723,7 @@ new MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51499,7 +52766,7 @@ new MTRColorControlAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51519,7 +52786,7 @@ new MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51561,7 +52828,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51581,7 +52848,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51621,7 +52888,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51642,7 +52909,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51676,11 +52943,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRIlluminanceMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::IlluminanceMeasurementCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::IlluminanceMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -51693,7 +52989,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51714,7 +53010,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51756,7 +53052,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51777,7 +53073,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51819,7 +53115,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51840,7 +53136,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51881,7 +53177,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51901,7 +53197,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -51942,7 +53238,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -51963,7 +53259,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52005,7 +53301,7 @@ new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52027,7 +53323,7 @@ new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscripti 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52070,7 +53366,7 @@ new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52092,7 +53388,7 @@ new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptio 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52135,7 +53431,7 @@ new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52155,7 +53451,7 @@ new MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52197,7 +53493,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52217,7 +53513,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52257,7 +53553,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52278,7 +53574,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52312,11 +53608,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRTemperatureMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::TemperatureMeasurementCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::TemperatureMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -52329,7 +53654,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52350,7 +53675,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52392,7 +53717,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52413,7 +53738,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52455,7 +53780,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52476,7 +53801,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52517,7 +53842,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52537,7 +53862,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52578,7 +53903,7 @@ new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52600,7 +53925,7 @@ new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscripti 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52643,7 +53968,7 @@ new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52665,7 +53990,7 @@ new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptio 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52708,7 +54033,7 @@ new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52728,7 +54053,7 @@ new MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52770,7 +54095,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52790,7 +54115,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52830,7 +54155,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52851,7 +54176,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52885,11 +54210,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRPressureMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::PressureMeasurementCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::PressureMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -52902,7 +54256,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52923,7 +54277,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -52965,7 +54319,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -52986,7 +54340,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53028,7 +54382,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53049,7 +54403,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53090,7 +54444,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53110,7 +54464,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53151,7 +54505,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53171,7 +54525,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53213,7 +54567,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53234,7 +54588,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53276,7 +54630,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53297,7 +54651,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53338,7 +54692,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53359,7 +54713,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53399,7 +54753,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53419,7 +54773,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53460,7 +54814,7 @@ new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53482,7 +54836,7 @@ new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionB 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53525,7 +54879,7 @@ new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53547,7 +54901,7 @@ new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53590,7 +54944,7 @@ new MTRPressureMeasurementAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53610,7 +54964,7 @@ new MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53652,7 +55006,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53672,7 +55026,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53712,7 +55066,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53733,7 +55087,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53767,11 +55121,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRFlowMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::FlowMeasurementCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::FlowMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -53784,7 +55167,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53805,7 +55188,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53847,7 +55230,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53868,7 +55251,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53910,7 +55293,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53931,7 +55314,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -53972,7 +55355,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -53992,7 +55375,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54033,7 +55416,7 @@ new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54055,7 +55438,7 @@ new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54098,7 +55481,7 @@ new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54120,7 +55503,7 @@ new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54163,7 +55546,7 @@ new MTRFlowMeasurementAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54183,7 +55566,7 @@ new MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54225,7 +55608,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54245,7 +55628,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54285,7 +55668,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54306,7 +55689,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54340,11 +55723,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRRelativeHumidityMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::RelativeHumidityMeasurementCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::RelativeHumidityMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -54357,7 +55769,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54378,7 +55790,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54420,7 +55832,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54441,7 +55853,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54483,7 +55895,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54504,7 +55916,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54545,7 +55957,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54565,7 +55977,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54607,7 +56019,7 @@ new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridg 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); }); } @@ -54630,7 +56042,7 @@ new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubsc auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, @@ -54675,7 +56087,7 @@ new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54697,7 +56109,7 @@ new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscr 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54741,7 +56153,7 @@ new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54761,7 +56173,7 @@ new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscription 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54803,7 +56215,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54823,7 +56235,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54863,7 +56275,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54884,7 +56296,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54918,11 +56330,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTROccupancySensing -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::OccupancySensingCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::OccupancySensingCluster **)cppClusterSlot { return &_cppCluster; } @@ -54934,7 +56375,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -54954,7 +56395,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -54994,7 +56435,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55016,7 +56457,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55057,7 +56498,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55079,7 +56520,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55120,7 +56561,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55154,7 +56595,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -55177,7 +56618,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55218,7 +56659,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55252,7 +56693,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -55275,7 +56716,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55316,7 +56757,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55350,7 +56791,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -55373,7 +56814,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55414,7 +56855,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55448,7 +56889,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -55471,7 +56912,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55512,7 +56953,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55546,7 +56987,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -55569,7 +57010,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55610,7 +57051,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55644,7 +57085,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -55667,7 +57108,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55708,7 +57149,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55742,7 +57183,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -55765,7 +57206,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55807,7 +57248,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55841,7 +57282,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -55864,7 +57305,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -55906,7 +57347,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -55940,7 +57381,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -55963,7 +57404,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56006,7 +57447,7 @@ new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56028,7 +57469,7 @@ new MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBrid 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56071,7 +57512,7 @@ new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56093,7 +57534,7 @@ new MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56136,7 +57577,7 @@ new MTROccupancySensingAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56156,7 +57597,7 @@ new MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56198,7 +57639,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56218,7 +57659,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56258,7 +57699,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56279,7 +57720,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56313,11 +57754,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRWakeOnLan -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::WakeOnLanCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::WakeOnLanCluster **)cppClusterSlot { return &_cppCluster; } @@ -56329,7 +57799,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, using TypeInfo = WakeOnLan::Attributes::MACAddress::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); }); } @@ -56349,7 +57819,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56390,7 +57860,7 @@ new MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::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); }); } @@ -56412,7 +57882,7 @@ new MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56455,7 +57925,7 @@ new MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::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); }); } @@ -56477,7 +57947,7 @@ new MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56520,7 +57990,7 @@ new MTRWakeOnLanAttributeListListAttributeCallbackBridge( using TypeInfo = WakeOnLan::Attributes::AttributeList::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); }); } @@ -56540,7 +58010,7 @@ new MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56582,7 +58052,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56602,7 +58072,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56642,7 +58112,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = WakeOnLan::Attributes::ClusterRevision::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); }); } @@ -56663,7 +58133,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56697,11 +58167,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRChannel -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ChannelCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ChannelCluster **)cppClusterSlot { return &_cppCluster; } @@ -56724,7 +58223,7 @@ new MTRChannelClusterChangeChannelResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -56751,7 +58250,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -56776,7 +58275,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -56789,7 +58288,7 @@ new MTRChannelChannelListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56809,7 +58308,7 @@ new MTRChannelChannelListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56850,7 +58349,7 @@ new MTRChannelLineupStructAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56871,7 +58370,7 @@ new MTRChannelLineupStructAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56913,7 +58412,7 @@ new MTRChannelCurrentChannelStructAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56934,7 +58433,7 @@ new MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -56977,7 +58476,7 @@ new MTRChannelGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -56999,7 +58498,7 @@ new MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57042,7 +58541,7 @@ new MTRChannelAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57064,7 +58563,7 @@ new MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57107,7 +58606,7 @@ new MTRChannelAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57127,7 +58626,7 @@ new MTRChannelAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57168,7 +58667,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57188,7 +58687,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57228,7 +58727,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57249,7 +58748,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57283,11 +58782,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRTargetNavigator -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::TargetNavigatorCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::TargetNavigatorCluster **)cppClusterSlot { return &_cppCluster; } @@ -57314,7 +58842,7 @@ new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -57327,7 +58855,7 @@ new MTRTargetNavigatorTargetListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57347,7 +58875,7 @@ new MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57388,7 +58916,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57409,7 +58937,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57451,7 +58979,7 @@ new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57473,7 +59001,7 @@ new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57516,7 +59044,7 @@ new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57538,7 +59066,7 @@ new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57581,7 +59109,7 @@ new MTRTargetNavigatorAttributeListListAttributeCallbackBridge( 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 self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57601,7 +59129,7 @@ new MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57643,7 +59171,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57663,7 +59191,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57703,7 +59231,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -57724,7 +59252,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -57758,11 +59286,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRMediaPlayback -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::MediaPlaybackCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::MediaPlaybackCluster **)cppClusterSlot { return &_cppCluster; } @@ -57789,7 +59346,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -57816,7 +59373,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -57843,7 +59400,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -57870,7 +59427,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -57897,7 +59454,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -57924,7 +59481,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -57951,7 +59508,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -57978,7 +59535,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -58001,7 +59558,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -58024,7 +59581,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -58047,7 +59604,7 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -58060,7 +59617,7 @@ new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58080,7 +59637,7 @@ new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58123,7 +59680,7 @@ new MTRNullableInt64uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58143,7 +59700,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58184,7 +59741,7 @@ new MTRNullableInt64uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58204,7 +59761,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58245,7 +59802,7 @@ new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58266,7 +59823,7 @@ new MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58308,7 +59865,7 @@ new MTRFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58329,7 +59886,7 @@ new MTRFloatAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58371,7 +59928,7 @@ new MTRNullableInt64uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58391,7 +59948,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58433,7 +59990,7 @@ new MTRNullableInt64uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58454,7 +60011,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58496,7 +60053,7 @@ new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58518,7 +60075,7 @@ new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58561,7 +60118,7 @@ new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58583,7 +60140,7 @@ new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58626,7 +60183,7 @@ new MTRMediaPlaybackAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58646,7 +60203,7 @@ new MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58688,7 +60245,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58708,7 +60265,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58748,7 +60305,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58769,7 +60326,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58803,11 +60360,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRMediaInput -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::MediaInputCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::MediaInputCluster **)cppClusterSlot { return &_cppCluster; } @@ -58832,7 +60418,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -58861,7 +60447,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -58890,7 +60476,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -58916,7 +60502,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -58929,7 +60515,7 @@ new MTRMediaInputInputListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -58949,7 +60535,7 @@ new MTRMediaInputInputListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -58989,7 +60575,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59009,7 +60595,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59051,7 +60637,7 @@ new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59073,7 +60659,7 @@ new MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59116,7 +60702,7 @@ new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59138,7 +60724,7 @@ new MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59181,7 +60767,7 @@ new MTRMediaInputAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59201,7 +60787,7 @@ new MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59243,7 +60829,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59263,7 +60849,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59303,7 +60889,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59324,7 +60910,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59358,11 +60944,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRLowPower -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::LowPowerCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::LowPowerCluster **)cppClusterSlot { return &_cppCluster; } @@ -59390,7 +61005,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -59403,7 +61018,7 @@ new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59425,7 +61040,7 @@ new MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59468,7 +61083,7 @@ new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59490,7 +61105,7 @@ new MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59533,7 +61148,7 @@ new MTRLowPowerAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59553,7 +61168,7 @@ new MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59595,7 +61210,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59615,7 +61230,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59655,7 +61270,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59676,7 +61291,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59710,11 +61325,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRKeypadInput -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::KeypadInputCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::KeypadInputCluster **)cppClusterSlot { return &_cppCluster; } @@ -59737,7 +61381,7 @@ new MTRKeypadInputClusterSendKeyResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -59750,7 +61394,7 @@ new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59772,7 +61416,7 @@ new MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59815,7 +61459,7 @@ new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59837,7 +61481,7 @@ new MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59880,7 +61524,7 @@ new MTRKeypadInputAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59900,7 +61544,7 @@ new MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -59942,7 +61586,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -59962,7 +61606,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60002,7 +61646,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -60023,7 +61667,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60057,11 +61701,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRContentLauncher -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ContentLauncherCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ContentLauncherCluster **)cppClusterSlot { return &_cppCluster; } @@ -60139,7 +61812,7 @@ new MTRContentLauncherClusterLaunchResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -60260,7 +61933,7 @@ new MTRContentLauncherClusterLaunchResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -60273,7 +61946,7 @@ new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -60293,7 +61966,7 @@ new MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60335,7 +62008,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -60369,7 +62042,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -60392,7 +62065,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60434,7 +62107,7 @@ new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -60456,7 +62129,7 @@ new MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridg 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60499,7 +62172,7 @@ new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -60521,7 +62194,7 @@ new MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60564,7 +62237,7 @@ new MTRContentLauncherAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -60584,7 +62257,7 @@ new MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60626,7 +62299,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -60646,7 +62319,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60686,7 +62359,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -60707,7 +62380,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60741,11 +62414,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRAudioOutput -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::AudioOutputCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::AudioOutputCluster **)cppClusterSlot { return &_cppCluster; } @@ -60771,7 +62473,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -60798,7 +62500,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -60811,7 +62513,7 @@ new MTRAudioOutputOutputListListAttributeCallbackBridge( using TypeInfo = AudioOutput::Attributes::OutputList::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); }); } @@ -60831,7 +62533,7 @@ new MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge( using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60872,7 +62574,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can using TypeInfo = AudioOutput::Attributes::CurrentOutput::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); }); } @@ -60893,7 +62595,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -60935,7 +62637,7 @@ new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::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); }); } @@ -60957,7 +62659,7 @@ new MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61000,7 +62702,7 @@ new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::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); }); } @@ -61022,7 +62724,7 @@ new MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61065,7 +62767,7 @@ new MTRAudioOutputAttributeListListAttributeCallbackBridge( using TypeInfo = AudioOutput::Attributes::AttributeList::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); }); } @@ -61085,7 +62787,7 @@ new MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61127,7 +62829,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -61147,7 +62849,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61187,7 +62889,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = AudioOutput::Attributes::ClusterRevision::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); }); } @@ -61208,7 +62910,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61242,11 +62944,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRApplicationLauncher -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ApplicationLauncherCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ApplicationLauncherCluster **)cppClusterSlot { return &_cppCluster; } @@ -61274,7 +63005,7 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -61298,7 +63029,7 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -61322,7 +63053,7 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -61335,7 +63066,7 @@ new MTRApplicationLauncherCatalogListListAttributeCallbackBridge( using TypeInfo = ApplicationLauncher::Attributes::CatalogList::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); }); } @@ -61355,7 +63086,7 @@ new MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61397,7 +63128,7 @@ new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge( using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::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); }); } @@ -61441,7 +63172,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -61463,7 +63194,7 @@ new MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61506,7 +63237,7 @@ new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::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); }); } @@ -61528,7 +63259,7 @@ new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionB using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61571,7 +63302,7 @@ new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::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); }); } @@ -61593,7 +63324,7 @@ new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBr using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61636,7 +63367,7 @@ new MTRApplicationLauncherAttributeListListAttributeCallbackBridge( using TypeInfo = ApplicationLauncher::Attributes::AttributeList::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); }); } @@ -61656,7 +63387,7 @@ new MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61698,7 +63429,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -61718,7 +63449,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61758,7 +63489,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::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); }); } @@ -61779,7 +63510,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61813,11 +63544,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRApplicationBasic -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ApplicationBasicCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ApplicationBasicCluster **)cppClusterSlot { return &_cppCluster; } @@ -61829,7 +63589,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, using TypeInfo = ApplicationBasic::Attributes::VendorName::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); }); } @@ -61849,7 +63609,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61889,7 +63649,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ApplicationBasic::Attributes::VendorID::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); }); } @@ -61909,7 +63669,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -61949,7 +63709,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, using TypeInfo = ApplicationBasic::Attributes::ApplicationName::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); }); } @@ -61970,7 +63730,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62011,7 +63771,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ApplicationBasic::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->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -62031,7 +63791,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62072,7 +63832,7 @@ new MTRApplicationBasicApplicationStructAttributeCallbackBridge( using TypeInfo = ApplicationBasic::Attributes::Application::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); }); } @@ -62094,7 +63854,7 @@ new MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62137,7 +63897,7 @@ new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge( using TypeInfo = ApplicationBasic::Attributes::Status::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); }); } @@ -62157,7 +63917,7 @@ new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscription using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62198,7 +63958,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::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); }); } @@ -62219,7 +63979,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62261,7 +64021,7 @@ new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge( using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::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); }); } @@ -62282,7 +64042,7 @@ new MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62325,7 +64085,7 @@ new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::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); }); } @@ -62347,7 +64107,7 @@ new MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBrid using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62390,7 +64150,7 @@ new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::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); }); } @@ -62412,7 +64172,7 @@ new MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridg using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62455,7 +64215,7 @@ new MTRApplicationBasicAttributeListListAttributeCallbackBridge( using TypeInfo = ApplicationBasic::Attributes::AttributeList::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); }); } @@ -62475,7 +64235,7 @@ new MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62517,7 +64277,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -62537,7 +64297,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62577,7 +64337,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::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); }); } @@ -62598,7 +64358,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62632,11 +64392,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRAccountLogin -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::AccountLoginCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::AccountLoginCluster **)cppClusterSlot { return &_cppCluster; } @@ -62662,7 +64451,7 @@ new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -62691,7 +64480,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -62723,7 +64512,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -62736,7 +64525,7 @@ new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge( using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::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); }); } @@ -62758,7 +64547,7 @@ new MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62801,7 +64590,7 @@ new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge( using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::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); }); } @@ -62823,7 +64612,7 @@ new MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62866,7 +64655,7 @@ new MTRAccountLoginAttributeListListAttributeCallbackBridge( using TypeInfo = AccountLogin::Attributes::AttributeList::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); }); } @@ -62886,7 +64675,7 @@ new MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62928,7 +64717,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -62948,7 +64737,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -62988,7 +64777,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca using TypeInfo = AccountLogin::Attributes::ClusterRevision::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); }); } @@ -63009,7 +64798,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63043,11 +64832,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRElectricalMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::ElectricalMeasurementCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::ElectricalMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -63076,7 +64894,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -63104,7 +64922,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -63116,7 +64934,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63137,7 +64955,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63178,7 +64996,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63198,7 +65016,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63238,7 +65056,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63258,7 +65076,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63299,7 +65117,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63319,7 +65137,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63360,7 +65178,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63380,7 +65198,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63420,7 +65238,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63440,7 +65258,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63481,7 +65299,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63501,7 +65319,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63541,7 +65359,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63561,7 +65379,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63601,7 +65419,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63621,7 +65439,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63661,7 +65479,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63681,7 +65499,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63721,7 +65539,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63743,7 +65561,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63784,7 +65602,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63805,7 +65623,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63846,7 +65664,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63868,7 +65686,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63909,7 +65727,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63930,7 +65748,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -63971,7 +65789,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -63992,7 +65810,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64033,7 +65851,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64054,7 +65872,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64095,7 +65913,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64115,7 +65933,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64156,7 +65974,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64177,7 +65995,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64218,7 +66036,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64239,7 +66057,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64280,7 +66098,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64301,7 +66119,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64342,7 +66160,7 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64363,7 +66181,7 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64404,7 +66222,7 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64425,7 +66243,7 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64466,7 +66284,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64487,7 +66305,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64528,7 +66346,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64550,7 +66368,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64591,7 +66409,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64613,7 +66431,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64654,7 +66472,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64676,7 +66494,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64717,7 +66535,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64739,7 +66557,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64780,7 +66598,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64802,7 +66620,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64843,7 +66661,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64865,7 +66683,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64906,7 +66724,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64928,7 +66746,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -64969,7 +66787,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -64991,7 +66809,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65032,7 +66850,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65054,7 +66872,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65095,7 +66913,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65117,7 +66935,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65158,7 +66976,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65180,7 +66998,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65221,7 +67039,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65243,7 +67061,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65284,7 +67102,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65306,7 +67124,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65347,7 +67165,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65368,7 +67186,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65409,7 +67227,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65430,7 +67248,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65471,7 +67289,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65491,7 +67309,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65532,7 +67350,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65554,7 +67372,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65595,7 +67413,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65617,7 +67435,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65658,7 +67476,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65680,7 +67498,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65721,7 +67539,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65743,7 +67561,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65784,7 +67602,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65806,7 +67624,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65847,7 +67665,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65869,7 +67687,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65910,7 +67728,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65931,7 +67749,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -65972,7 +67790,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -65992,7 +67810,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66032,7 +67850,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66053,7 +67871,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66094,7 +67912,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66115,7 +67933,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66156,7 +67974,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66176,7 +67994,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66216,7 +68034,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66237,7 +68055,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66278,7 +68096,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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 self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66299,7 +68117,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66340,7 +68158,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66360,7 +68178,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66401,7 +68219,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66422,7 +68240,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66463,7 +68281,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66484,7 +68302,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66525,7 +68343,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66546,7 +68364,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66587,7 +68405,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66608,7 +68426,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66649,7 +68467,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66669,7 +68487,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66710,7 +68528,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66744,7 +68562,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -66767,7 +68585,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66808,7 +68626,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66842,7 +68660,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -66865,7 +68683,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -66906,7 +68724,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -66940,7 +68758,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -66963,7 +68781,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67004,7 +68822,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67038,7 +68856,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -67061,7 +68879,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67102,7 +68920,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67133,7 +68951,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -67156,7 +68974,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67197,7 +69015,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67229,7 +69047,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -67252,7 +69070,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67293,7 +69111,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67315,7 +69133,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67356,7 +69174,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67377,7 +69195,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67418,7 +69236,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67440,7 +69258,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67481,7 +69299,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67502,7 +69320,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67543,7 +69361,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67564,7 +69382,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67605,7 +69423,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67626,7 +69444,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67667,7 +69485,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67698,7 +69516,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -67720,7 +69538,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67761,7 +69579,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67782,7 +69600,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67823,7 +69641,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67844,7 +69662,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67885,7 +69703,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -67916,7 +69734,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -67939,7 +69757,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -67980,7 +69798,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68001,7 +69819,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68042,7 +69860,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68063,7 +69881,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68104,7 +69922,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68126,7 +69944,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68167,7 +69985,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68189,7 +70007,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68230,7 +70048,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68252,7 +70070,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68293,7 +70111,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68315,7 +70133,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68356,7 +70174,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68378,7 +70196,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68419,7 +70237,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68441,7 +70259,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68482,7 +70300,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68503,7 +70321,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68544,7 +70362,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68565,7 +70383,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68606,7 +70424,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68627,7 +70445,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68668,7 +70486,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68690,7 +70508,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68731,7 +70549,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68753,7 +70571,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68794,7 +70612,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68815,7 +70633,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68856,7 +70674,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68878,7 +70696,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68919,7 +70737,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -68941,7 +70759,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -68982,7 +70800,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69003,7 +70821,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69044,7 +70862,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69066,7 +70884,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69107,7 +70925,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69129,7 +70947,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69170,7 +70988,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69191,7 +71009,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69232,7 +71050,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69254,7 +71072,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69295,7 +71113,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69317,7 +71135,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69358,7 +71176,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69380,7 +71198,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69421,7 +71239,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69443,7 +71261,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69484,7 +71302,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69505,7 +71323,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69546,7 +71364,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69568,7 +71386,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69610,7 +71428,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69632,7 +71450,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69673,7 +71491,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69695,7 +71513,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69736,7 +71554,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69758,7 +71576,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69799,7 +71617,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69821,7 +71639,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69862,7 +71680,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69884,7 +71702,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69925,7 +71743,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -69947,7 +71765,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -69988,7 +71806,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70009,7 +71827,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70050,7 +71868,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70072,7 +71890,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70113,7 +71931,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70135,7 +71953,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70176,7 +71994,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70197,7 +72015,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70238,7 +72056,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70260,7 +72078,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70301,7 +72119,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70323,7 +72141,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70364,7 +72182,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70385,7 +72203,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70426,7 +72244,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70448,7 +72266,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70489,7 +72307,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70511,7 +72329,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70552,7 +72370,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70573,7 +72391,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70614,7 +72432,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70636,7 +72454,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70677,7 +72495,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70699,7 +72517,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70740,7 +72558,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70762,7 +72580,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70803,7 +72621,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70825,7 +72643,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70866,7 +72684,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70887,7 +72705,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70928,7 +72746,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -70950,7 +72768,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -70992,7 +72810,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71014,7 +72832,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71055,7 +72873,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71077,7 +72895,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71118,7 +72936,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71140,7 +72958,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71181,7 +72999,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71203,7 +73021,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71244,7 +73062,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71266,7 +73084,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71307,7 +73125,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71329,7 +73147,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71371,7 +73189,7 @@ new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71393,7 +73211,7 @@ new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptio 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71436,7 +73254,7 @@ new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71458,7 +73276,7 @@ new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscription 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71501,7 +73319,7 @@ new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71521,7 +73339,7 @@ new MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71563,7 +73381,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71583,7 +73401,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71623,7 +73441,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -71644,7 +73462,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -71678,11 +73496,40 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end @implementation MTRTestCluster -- (chip::Controller::ClusterBase *)getCluster +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + // Must allocate cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + *[self cppClusterSlot] = new chip::Controller::TestClusterCluster( + *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); + }); + if (self.cppCluster == nullptr) { + return nil; + } + } + return self; +} + +- (chip::Controller::TestClusterCluster **)cppClusterSlot { return &_cppCluster; } @@ -71710,7 +73557,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -71739,7 +73586,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -71766,7 +73613,7 @@ new MTRTestClusterClusterTestSpecificResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -71795,7 +73642,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -71819,7 +73666,7 @@ new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -71842,7 +73689,7 @@ new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72073,7 +73920,7 @@ new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72103,7 +73950,7 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72135,7 +73982,7 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72188,7 +74035,7 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72232,7 +74079,7 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72361,7 +74208,7 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72514,7 +74361,7 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72558,7 +74405,7 @@ new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72582,7 +74429,7 @@ new MTRTestClusterClusterTestEnumsResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72615,7 +74462,7 @@ new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72807,7 +74654,7 @@ new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72837,7 +74684,7 @@ new MTRTestClusterClusterSimpleStructResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72869,7 +74716,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72900,7 +74747,7 @@ new MTRCommandSuccessCallbackBridge( ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72925,7 +74772,7 @@ new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72950,7 +74797,7 @@ new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( + return self.cppCluster->InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } @@ -72961,7 +74808,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -72992,7 +74839,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73013,7 +74860,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73053,7 +74900,7 @@ new MTRTestClusterBitmap8AttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73084,7 +74931,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73105,7 +74952,7 @@ new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73146,7 +74993,7 @@ new MTRTestClusterBitmap16AttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73177,7 +75024,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedShortValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73198,7 +75045,7 @@ new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73239,7 +75086,7 @@ new MTRTestClusterBitmap32AttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73270,7 +75117,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedIntValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73291,7 +75138,7 @@ new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73332,7 +75179,7 @@ new MTRTestClusterBitmap64AttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73363,7 +75210,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedLongLongValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73384,7 +75231,7 @@ new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73423,7 +75270,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73454,7 +75301,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73475,7 +75322,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73514,7 +75361,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73545,7 +75392,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73566,7 +75413,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73605,7 +75452,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73636,7 +75483,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73657,7 +75504,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73696,7 +75543,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73727,7 +75574,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73748,7 +75595,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73787,7 +75634,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73818,7 +75665,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73839,7 +75686,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73878,7 +75725,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -73909,7 +75756,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -73930,7 +75777,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -73969,7 +75816,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74000,7 +75847,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74021,7 +75868,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74060,7 +75907,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74091,7 +75938,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74112,7 +75959,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74151,7 +75998,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74182,7 +76029,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74203,7 +76050,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74242,7 +76089,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74273,7 +76120,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74294,7 +76141,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74333,7 +76180,7 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74364,7 +76211,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.intValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74385,7 +76232,7 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74424,7 +76271,7 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74455,7 +76302,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.intValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74476,7 +76323,7 @@ new MTRInt32sAttributeCallbackSubscriptionBridge( using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74515,7 +76362,7 @@ new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74546,7 +76393,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.longLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74567,7 +76414,7 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74606,7 +76453,7 @@ new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74637,7 +76484,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.longLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74658,7 +76505,7 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74697,7 +76544,7 @@ new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74728,7 +76575,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.longLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74749,7 +76596,7 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74788,7 +76635,7 @@ new MTRInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74819,7 +76666,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.longLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74840,7 +76687,7 @@ new MTRInt64sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74879,7 +76726,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -74910,7 +76757,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -74931,7 +76778,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -74970,7 +76817,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75001,7 +76848,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75022,7 +76869,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75062,7 +76909,7 @@ new MTRFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75093,7 +76940,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.floatValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75114,7 +76961,7 @@ new MTRFloatAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75155,7 +77002,7 @@ new MTRDoubleAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75186,7 +77033,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.doubleValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75207,7 +77054,7 @@ new MTRDoubleAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75248,7 +77095,7 @@ new MTROctetStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75279,7 +77126,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asByteSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75300,7 +77147,7 @@ new MTROctetStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75341,7 +77188,7 @@ new MTRTestClusterListInt8uListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75393,7 +77240,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75414,7 +77261,7 @@ new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75455,7 +77302,7 @@ new MTRTestClusterListOctetStringListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75507,7 +77354,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75529,7 +77376,7 @@ new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75572,7 +77419,7 @@ new MTRTestClusterListStructOctetStringListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75625,7 +77472,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75648,7 +77495,7 @@ new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75690,7 +77537,7 @@ new MTROctetStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75721,7 +77568,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asByteSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75743,7 +77590,7 @@ new MTROctetStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75784,7 +77631,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75815,7 +77662,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75836,7 +77683,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75876,7 +77723,7 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -75907,7 +77754,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -75929,7 +77776,7 @@ new MTRCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -75969,7 +77816,7 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -76000,7 +77847,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -76021,7 +77868,7 @@ new MTRInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -76060,7 +77907,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -76091,7 +77938,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -76112,7 +77959,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -76152,7 +77999,7 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -76183,7 +78030,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedShortValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -76204,7 +78051,7 @@ new MTRVendorIdAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -76245,7 +78092,7 @@ new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -76472,7 +78319,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -76495,7 +78342,7 @@ new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscripti 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -76538,7 +78385,7 @@ new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -76569,7 +78416,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -76590,7 +78437,7 @@ new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -76632,7 +78479,7 @@ new MTRTestClusterStructAttrStructAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -76673,7 +78520,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue.h = value.h.doubleValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -76695,7 +78542,7 @@ new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -76737,7 +78584,7 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -76768,7 +78615,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -76791,7 +78638,7 @@ new MTRInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -76832,7 +78679,7 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -76863,7 +78710,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -76886,7 +78733,7 @@ new MTRInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -76927,7 +78774,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -76959,7 +78806,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -76982,7 +78829,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77023,7 +78870,7 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -77055,7 +78902,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -77078,7 +78925,7 @@ new MTRInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77120,7 +78967,7 @@ new MTRTestClusterListLongOctetStringListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -77172,7 +79019,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -77195,7 +79042,7 @@ new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77238,7 +79085,7 @@ new MTRTestClusterListFabricScopedListAttributeCallbackBridge( 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, + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } @@ -77347,7 +79194,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -77369,7 +79216,7 @@ new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77411,7 +79258,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -77442,7 +79289,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -77464,7 +79311,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77505,7 +79352,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -77536,7 +79383,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -77559,7 +79406,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77600,7 +79447,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -77631,7 +79478,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -77654,7 +79501,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77695,7 +79542,7 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -77726,7 +79573,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -77747,7 +79594,7 @@ new MTRBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77789,7 +79636,7 @@ new MTRNullableBooleanAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -77825,7 +79672,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -77847,7 +79694,7 @@ new MTRNullableBooleanAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77889,7 +79736,7 @@ new MTRTestClusterNullableBitmap8AttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -77925,7 +79772,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -77947,7 +79794,7 @@ new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -77990,7 +79837,7 @@ new MTRTestClusterNullableBitmap16AttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78026,7 +79873,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78048,7 +79895,7 @@ new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78091,7 +79938,7 @@ new MTRTestClusterNullableBitmap32AttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78127,7 +79974,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78149,7 +79996,7 @@ new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78192,7 +80039,7 @@ new MTRTestClusterNullableBitmap64AttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78228,7 +80075,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78250,7 +80097,7 @@ new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78293,7 +80140,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78329,7 +80176,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78351,7 +80198,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78393,7 +80240,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78429,7 +80276,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78451,7 +80298,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78493,7 +80340,7 @@ new MTRNullableInt32uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78529,7 +80376,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78551,7 +80398,7 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78593,7 +80440,7 @@ new MTRNullableInt32uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78629,7 +80476,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78651,7 +80498,7 @@ new MTRNullableInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78693,7 +80540,7 @@ new MTRNullableInt64uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78729,7 +80576,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78751,7 +80598,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78793,7 +80640,7 @@ new MTRNullableInt64uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78829,7 +80676,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78851,7 +80698,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78893,7 +80740,7 @@ new MTRNullableInt64uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -78929,7 +80776,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -78951,7 +80798,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -78993,7 +80840,7 @@ new MTRNullableInt64uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79029,7 +80876,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79051,7 +80898,7 @@ new MTRNullableInt64uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79093,7 +80940,7 @@ new MTRNullableInt8sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79129,7 +80976,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79151,7 +80998,7 @@ new MTRNullableInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79193,7 +81040,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79229,7 +81076,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79251,7 +81098,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79293,7 +81140,7 @@ new MTRNullableInt32sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79329,7 +81176,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79351,7 +81198,7 @@ new MTRNullableInt32sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79393,7 +81240,7 @@ new MTRNullableInt32sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79429,7 +81276,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79451,7 +81298,7 @@ new MTRNullableInt32sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79493,7 +81340,7 @@ new MTRNullableInt64sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79529,7 +81376,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79551,7 +81398,7 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79593,7 +81440,7 @@ new MTRNullableInt64sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79629,7 +81476,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79651,7 +81498,7 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79693,7 +81540,7 @@ new MTRNullableInt64sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79729,7 +81576,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79751,7 +81598,7 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79793,7 +81640,7 @@ new MTRNullableInt64sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79829,7 +81676,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79851,7 +81698,7 @@ new MTRNullableInt64sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79893,7 +81740,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -79929,7 +81776,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -79951,7 +81798,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -79993,7 +81840,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80029,7 +81876,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80051,7 +81898,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -80093,7 +81940,7 @@ new MTRNullableFloatAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80129,7 +81976,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80152,7 +81999,7 @@ new MTRNullableFloatAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -80194,7 +82041,7 @@ new MTRNullableDoubleAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80230,7 +82077,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80253,7 +82100,7 @@ new MTRNullableDoubleAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -80295,7 +82142,7 @@ new MTRNullableOctetStringAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80331,7 +82178,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80354,7 +82201,7 @@ new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -80396,7 +82243,7 @@ new MTRNullableCharStringAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80432,7 +82279,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80454,7 +82301,7 @@ new MTRNullableCharStringAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -80496,7 +82343,7 @@ new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80532,7 +82379,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80554,7 +82401,7 @@ new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -80597,7 +82444,7 @@ new MTRTestClusterNullableStructStructAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80643,7 +82490,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80665,7 +82512,7 @@ new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -80708,7 +82555,7 @@ new MTRNullableInt8uAttributeCallbackBridge( 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 self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80747,7 +82594,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80770,7 +82617,7 @@ new MTRNullableInt8uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -80812,7 +82659,7 @@ new MTRNullableInt8sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80851,7 +82698,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80874,7 +82721,7 @@ new MTRNullableInt8sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -80916,7 +82763,7 @@ new MTRNullableInt16uAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -80955,7 +82802,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -80978,7 +82825,7 @@ new MTRNullableInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -81020,7 +82867,7 @@ new MTRNullableInt16sAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -81059,7 +82906,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( + return self.cppCluster->WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } @@ -81082,7 +82929,7 @@ new MTRNullableInt16sAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -81124,7 +82971,7 @@ new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -81146,7 +82993,7 @@ new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -81189,7 +83036,7 @@ new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -81211,7 +83058,7 @@ new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -81254,7 +83101,7 @@ new MTRTestClusterAttributeListListAttributeCallbackBridge( 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -81274,7 +83121,7 @@ new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge( using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -81316,7 +83163,7 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -81336,7 +83183,7 @@ new MTRInt32uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -81376,7 +83223,7 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca 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); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -81397,7 +83244,7 @@ new MTRInt16uAttributeCallbackSubscriptionBridge( 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, + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], @@ -81431,6 +83278,16 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } +- (void)dealloc +{ + // Must delete cppCluster on the Matter queue. + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + if (self.cppCluster != nullptr) { + delete self.cppCluster; + } + }); +} + @end // NOLINTEND(clang-analyzer-cplusplus.NewDeleteLeaks) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc_internal.h index 98dc0c41127bea..8d3b23c5062c2d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc_internal.h @@ -22,257 +22,385 @@ #import "MTRDevice.h" @interface MTRIdentify () -@property (readonly) chip::Controller::IdentifyCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::IdentifyCluster * cppCluster; +- (chip::Controller::IdentifyCluster **)cppClusterSlot; @end @interface MTRGroups () -@property (readonly) chip::Controller::GroupsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GroupsCluster * cppCluster; +- (chip::Controller::GroupsCluster **)cppClusterSlot; @end @interface MTRScenes () -@property (readonly) chip::Controller::ScenesCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ScenesCluster * cppCluster; +- (chip::Controller::ScenesCluster **)cppClusterSlot; @end @interface MTROnOff () -@property (readonly) chip::Controller::OnOffCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OnOffCluster * cppCluster; +- (chip::Controller::OnOffCluster **)cppClusterSlot; @end @interface MTROnOffSwitchConfiguration () -@property (readonly) chip::Controller::OnOffSwitchConfigurationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OnOffSwitchConfigurationCluster * cppCluster; +- (chip::Controller::OnOffSwitchConfigurationCluster **)cppClusterSlot; @end @interface MTRLevelControl () -@property (readonly) chip::Controller::LevelControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::LevelControlCluster * cppCluster; +- (chip::Controller::LevelControlCluster **)cppClusterSlot; @end @interface MTRBinaryInputBasic () -@property (readonly) chip::Controller::BinaryInputBasicCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BinaryInputBasicCluster * cppCluster; +- (chip::Controller::BinaryInputBasicCluster **)cppClusterSlot; @end @interface MTRDescriptor () -@property (readonly) chip::Controller::DescriptorCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::DescriptorCluster * cppCluster; +- (chip::Controller::DescriptorCluster **)cppClusterSlot; @end @interface MTRBinding () -@property (readonly) chip::Controller::BindingCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BindingCluster * cppCluster; +- (chip::Controller::BindingCluster **)cppClusterSlot; @end @interface MTRAccessControl () -@property (readonly) chip::Controller::AccessControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AccessControlCluster * cppCluster; +- (chip::Controller::AccessControlCluster **)cppClusterSlot; @end @interface MTRBridgedActions () -@property (readonly) chip::Controller::BridgedActionsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BridgedActionsCluster * cppCluster; +- (chip::Controller::BridgedActionsCluster **)cppClusterSlot; @end @interface MTRBasic () -@property (readonly) chip::Controller::BasicCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BasicCluster * cppCluster; +- (chip::Controller::BasicCluster **)cppClusterSlot; @end @interface MTROtaSoftwareUpdateProvider () -@property (readonly) chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OtaSoftwareUpdateProviderCluster * cppCluster; +- (chip::Controller::OtaSoftwareUpdateProviderCluster **)cppClusterSlot; @end @interface MTROtaSoftwareUpdateRequestor () -@property (readonly) chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OtaSoftwareUpdateRequestorCluster * cppCluster; +- (chip::Controller::OtaSoftwareUpdateRequestorCluster **)cppClusterSlot; @end @interface MTRLocalizationConfiguration () -@property (readonly) chip::Controller::LocalizationConfigurationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::LocalizationConfigurationCluster * cppCluster; +- (chip::Controller::LocalizationConfigurationCluster **)cppClusterSlot; @end @interface MTRTimeFormatLocalization () -@property (readonly) chip::Controller::TimeFormatLocalizationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TimeFormatLocalizationCluster * cppCluster; +- (chip::Controller::TimeFormatLocalizationCluster **)cppClusterSlot; @end @interface MTRUnitLocalization () -@property (readonly) chip::Controller::UnitLocalizationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::UnitLocalizationCluster * cppCluster; +- (chip::Controller::UnitLocalizationCluster **)cppClusterSlot; @end @interface MTRPowerSourceConfiguration () -@property (readonly) chip::Controller::PowerSourceConfigurationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PowerSourceConfigurationCluster * cppCluster; +- (chip::Controller::PowerSourceConfigurationCluster **)cppClusterSlot; @end @interface MTRPowerSource () -@property (readonly) chip::Controller::PowerSourceCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PowerSourceCluster * cppCluster; +- (chip::Controller::PowerSourceCluster **)cppClusterSlot; @end @interface MTRGeneralCommissioning () -@property (readonly) chip::Controller::GeneralCommissioningCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GeneralCommissioningCluster * cppCluster; +- (chip::Controller::GeneralCommissioningCluster **)cppClusterSlot; @end @interface MTRNetworkCommissioning () -@property (readonly) chip::Controller::NetworkCommissioningCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::NetworkCommissioningCluster * cppCluster; +- (chip::Controller::NetworkCommissioningCluster **)cppClusterSlot; @end @interface MTRDiagnosticLogs () -@property (readonly) chip::Controller::DiagnosticLogsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::DiagnosticLogsCluster * cppCluster; +- (chip::Controller::DiagnosticLogsCluster **)cppClusterSlot; @end @interface MTRGeneralDiagnostics () -@property (readonly) chip::Controller::GeneralDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GeneralDiagnosticsCluster * cppCluster; +- (chip::Controller::GeneralDiagnosticsCluster **)cppClusterSlot; @end @interface MTRSoftwareDiagnostics () -@property (readonly) chip::Controller::SoftwareDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::SoftwareDiagnosticsCluster * cppCluster; +- (chip::Controller::SoftwareDiagnosticsCluster **)cppClusterSlot; @end @interface MTRThreadNetworkDiagnostics () -@property (readonly) chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ThreadNetworkDiagnosticsCluster * cppCluster; +- (chip::Controller::ThreadNetworkDiagnosticsCluster **)cppClusterSlot; @end @interface MTRWiFiNetworkDiagnostics () -@property (readonly) chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::WiFiNetworkDiagnosticsCluster * cppCluster; +- (chip::Controller::WiFiNetworkDiagnosticsCluster **)cppClusterSlot; @end @interface MTREthernetNetworkDiagnostics () -@property (readonly) chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::EthernetNetworkDiagnosticsCluster * cppCluster; +- (chip::Controller::EthernetNetworkDiagnosticsCluster **)cppClusterSlot; @end @interface MTRBridgedDeviceBasic () -@property (readonly) chip::Controller::BridgedDeviceBasicCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BridgedDeviceBasicCluster * cppCluster; +- (chip::Controller::BridgedDeviceBasicCluster **)cppClusterSlot; @end @interface MTRSwitch () -@property (readonly) chip::Controller::SwitchCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::SwitchCluster * cppCluster; +- (chip::Controller::SwitchCluster **)cppClusterSlot; @end @interface MTRAdministratorCommissioning () -@property (readonly) chip::Controller::AdministratorCommissioningCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AdministratorCommissioningCluster * cppCluster; +- (chip::Controller::AdministratorCommissioningCluster **)cppClusterSlot; @end @interface MTROperationalCredentials () -@property (readonly) chip::Controller::OperationalCredentialsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OperationalCredentialsCluster * cppCluster; +- (chip::Controller::OperationalCredentialsCluster **)cppClusterSlot; @end @interface MTRGroupKeyManagement () -@property (readonly) chip::Controller::GroupKeyManagementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GroupKeyManagementCluster * cppCluster; +- (chip::Controller::GroupKeyManagementCluster **)cppClusterSlot; @end @interface MTRFixedLabel () -@property (readonly) chip::Controller::FixedLabelCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::FixedLabelCluster * cppCluster; +- (chip::Controller::FixedLabelCluster **)cppClusterSlot; @end @interface MTRUserLabel () -@property (readonly) chip::Controller::UserLabelCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::UserLabelCluster * cppCluster; +- (chip::Controller::UserLabelCluster **)cppClusterSlot; @end @interface MTRBooleanState () -@property (readonly) chip::Controller::BooleanStateCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BooleanStateCluster * cppCluster; +- (chip::Controller::BooleanStateCluster **)cppClusterSlot; @end @interface MTRModeSelect () -@property (readonly) chip::Controller::ModeSelectCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ModeSelectCluster * cppCluster; +- (chip::Controller::ModeSelectCluster **)cppClusterSlot; @end @interface MTRDoorLock () -@property (readonly) chip::Controller::DoorLockCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::DoorLockCluster * cppCluster; +- (chip::Controller::DoorLockCluster **)cppClusterSlot; @end @interface MTRWindowCovering () -@property (readonly) chip::Controller::WindowCoveringCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::WindowCoveringCluster * cppCluster; +- (chip::Controller::WindowCoveringCluster **)cppClusterSlot; @end @interface MTRBarrierControl () -@property (readonly) chip::Controller::BarrierControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BarrierControlCluster * cppCluster; +- (chip::Controller::BarrierControlCluster **)cppClusterSlot; @end @interface MTRPumpConfigurationAndControl () -@property (readonly) chip::Controller::PumpConfigurationAndControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PumpConfigurationAndControlCluster * cppCluster; +- (chip::Controller::PumpConfigurationAndControlCluster **)cppClusterSlot; @end @interface MTRThermostat () -@property (readonly) chip::Controller::ThermostatCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ThermostatCluster * cppCluster; +- (chip::Controller::ThermostatCluster **)cppClusterSlot; @end @interface MTRFanControl () -@property (readonly) chip::Controller::FanControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::FanControlCluster * cppCluster; +- (chip::Controller::FanControlCluster **)cppClusterSlot; @end @interface MTRThermostatUserInterfaceConfiguration () -@property (readonly) chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ThermostatUserInterfaceConfigurationCluster * cppCluster; +- (chip::Controller::ThermostatUserInterfaceConfigurationCluster **)cppClusterSlot; @end @interface MTRColorControl () -@property (readonly) chip::Controller::ColorControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ColorControlCluster * cppCluster; +- (chip::Controller::ColorControlCluster **)cppClusterSlot; @end @interface MTRIlluminanceMeasurement () -@property (readonly) chip::Controller::IlluminanceMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::IlluminanceMeasurementCluster * cppCluster; +- (chip::Controller::IlluminanceMeasurementCluster **)cppClusterSlot; @end @interface MTRTemperatureMeasurement () -@property (readonly) chip::Controller::TemperatureMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TemperatureMeasurementCluster * cppCluster; +- (chip::Controller::TemperatureMeasurementCluster **)cppClusterSlot; @end @interface MTRPressureMeasurement () -@property (readonly) chip::Controller::PressureMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PressureMeasurementCluster * cppCluster; +- (chip::Controller::PressureMeasurementCluster **)cppClusterSlot; @end @interface MTRFlowMeasurement () -@property (readonly) chip::Controller::FlowMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::FlowMeasurementCluster * cppCluster; +- (chip::Controller::FlowMeasurementCluster **)cppClusterSlot; @end @interface MTRRelativeHumidityMeasurement () -@property (readonly) chip::Controller::RelativeHumidityMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::RelativeHumidityMeasurementCluster * cppCluster; +- (chip::Controller::RelativeHumidityMeasurementCluster **)cppClusterSlot; @end @interface MTROccupancySensing () -@property (readonly) chip::Controller::OccupancySensingCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OccupancySensingCluster * cppCluster; +- (chip::Controller::OccupancySensingCluster **)cppClusterSlot; @end @interface MTRWakeOnLan () -@property (readonly) chip::Controller::WakeOnLanCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::WakeOnLanCluster * cppCluster; +- (chip::Controller::WakeOnLanCluster **)cppClusterSlot; @end @interface MTRChannel () -@property (readonly) chip::Controller::ChannelCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ChannelCluster * cppCluster; +- (chip::Controller::ChannelCluster **)cppClusterSlot; @end @interface MTRTargetNavigator () -@property (readonly) chip::Controller::TargetNavigatorCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TargetNavigatorCluster * cppCluster; +- (chip::Controller::TargetNavigatorCluster **)cppClusterSlot; @end @interface MTRMediaPlayback () -@property (readonly) chip::Controller::MediaPlaybackCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::MediaPlaybackCluster * cppCluster; +- (chip::Controller::MediaPlaybackCluster **)cppClusterSlot; @end @interface MTRMediaInput () -@property (readonly) chip::Controller::MediaInputCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::MediaInputCluster * cppCluster; +- (chip::Controller::MediaInputCluster **)cppClusterSlot; @end @interface MTRLowPower () -@property (readonly) chip::Controller::LowPowerCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::LowPowerCluster * cppCluster; +- (chip::Controller::LowPowerCluster **)cppClusterSlot; @end @interface MTRKeypadInput () -@property (readonly) chip::Controller::KeypadInputCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::KeypadInputCluster * cppCluster; +- (chip::Controller::KeypadInputCluster **)cppClusterSlot; @end @interface MTRContentLauncher () -@property (readonly) chip::Controller::ContentLauncherCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ContentLauncherCluster * cppCluster; +- (chip::Controller::ContentLauncherCluster **)cppClusterSlot; @end @interface MTRAudioOutput () -@property (readonly) chip::Controller::AudioOutputCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AudioOutputCluster * cppCluster; +- (chip::Controller::AudioOutputCluster **)cppClusterSlot; @end @interface MTRApplicationLauncher () -@property (readonly) chip::Controller::ApplicationLauncherCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ApplicationLauncherCluster * cppCluster; +- (chip::Controller::ApplicationLauncherCluster **)cppClusterSlot; @end @interface MTRApplicationBasic () -@property (readonly) chip::Controller::ApplicationBasicCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ApplicationBasicCluster * cppCluster; +- (chip::Controller::ApplicationBasicCluster **)cppClusterSlot; @end @interface MTRAccountLogin () -@property (readonly) chip::Controller::AccountLoginCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AccountLoginCluster * cppCluster; +- (chip::Controller::AccountLoginCluster **)cppClusterSlot; @end @interface MTRElectricalMeasurement () -@property (readonly) chip::Controller::ElectricalMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ElectricalMeasurementCluster * cppCluster; +- (chip::Controller::ElectricalMeasurementCluster **)cppClusterSlot; @end @interface MTRTestCluster () -@property (readonly) chip::Controller::TestClusterCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TestClusterCluster * cppCluster; +- (chip::Controller::TestClusterCluster **)cppClusterSlot; @end diff --git a/src/transport/SessionHolder.h b/src/transport/SessionHolder.h index 8d830a267d763d..d81b7c6256a4e5 100644 --- a/src/transport/SessionHolder.h +++ b/src/transport/SessionHolder.h @@ -32,6 +32,7 @@ class SessionHolder : public IntrusiveListNodeBase<> { public: SessionHolder() {} + SessionHolder(const SessionHandle & handle) { Grab(handle); } virtual ~SessionHolder(); SessionHolder(const SessionHolder &); @@ -85,7 +86,8 @@ class SessionHolderWithDelegate : public SessionHolder { public: SessionHolderWithDelegate(SessionDelegate & delegate) : mDelegate(delegate) {} - SessionHolderWithDelegate(const SessionHandle & handle, SessionDelegate & delegate) : mDelegate(delegate) { Grab(handle); } + SessionHolderWithDelegate(const SessionHandle & handle, SessionDelegate & delegate) : SessionHolder(handle), mDelegate(delegate) + {} operator bool() const { return SessionHolder::operator bool(); } void SessionReleased() override diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h index 15ec5aca34a215..fffb265ae9c797 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h @@ -33,7 +33,10 @@ namespace Controller { class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/all-clusters-minimal-app/zap-generated/CHIPClusters.h b/zzz_generated/all-clusters-minimal-app/zap-generated/CHIPClusters.h index 15ec5aca34a215..fffb265ae9c797 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/CHIPClusters.h @@ -33,7 +33,10 @@ namespace Controller { class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/bridge-app/zap-generated/CHIPClusters.h b/zzz_generated/bridge-app/zap-generated/CHIPClusters.h index 064689a24df362..ca9ff71b7644f9 100644 --- a/zzz_generated/bridge-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/bridge-app/zap-generated/CHIPClusters.h @@ -33,14 +33,18 @@ namespace Controller { class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT AccessControlCluster : public ClusterBase { public: - AccessControlCluster() : ClusterBase(app::Clusters::AccessControl::Id) {} + AccessControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::AccessControl::Id, endpoint) + {} ~AccessControlCluster() {} }; diff --git a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/CHIPClusters.h index 85c73eaf003155..ae0e18dc059fa9 100644 --- a/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_contactsensor_lFAGG1bfRO/zap-generated/CHIPClusters.h @@ -33,14 +33,19 @@ namespace Controller { class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/CHIPClusters.h index deb7ed9a6d1910..93afb1af44e977 100644 --- a/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_dimmablelight_bCwGYSDpoe/zap-generated/CHIPClusters.h @@ -33,21 +33,28 @@ namespace Controller { class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; class DLL_EXPORT OccupancySensingCluster : public ClusterBase { public: - OccupancySensingCluster() : ClusterBase(app::Clusters::OccupancySensing::Id) {} + OccupancySensingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OccupancySensing::Id, endpoint) + {} ~OccupancySensingCluster() {} }; diff --git a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/CHIPClusters.h index d98f0914173eb9..a52eaf97f25d15 100644 --- a/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_flowsensor_1zVxHedlaV/zap-generated/CHIPClusters.h @@ -33,21 +33,28 @@ namespace Controller { class DLL_EXPORT GroupsCluster : public ClusterBase { public: - GroupsCluster() : ClusterBase(app::Clusters::Groups::Id) {} + GroupsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Groups::Id, endpoint) + {} ~GroupsCluster() {} }; class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/CHIPClusters.h index ae0f5fc6ff9641..3eed8652a45550 100644 --- a/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_heatingcoolingunit_ncdGai1E5a/zap-generated/CHIPClusters.h @@ -33,21 +33,28 @@ namespace Controller { class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; class DLL_EXPORT ThermostatCluster : public ClusterBase { public: - ThermostatCluster() : ClusterBase(app::Clusters::Thermostat::Id) {} + ThermostatCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Thermostat::Id, endpoint) + {} ~ThermostatCluster() {} }; diff --git a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/CHIPClusters.h index d98f0914173eb9..a52eaf97f25d15 100644 --- a/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_humiditysensor_Xyj4gda6Hb/zap-generated/CHIPClusters.h @@ -33,21 +33,28 @@ namespace Controller { class DLL_EXPORT GroupsCluster : public ClusterBase { public: - GroupsCluster() : ClusterBase(app::Clusters::Groups::Id) {} + GroupsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Groups::Id, endpoint) + {} ~GroupsCluster() {} }; class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/CHIPClusters.h index d98f0914173eb9..a52eaf97f25d15 100644 --- a/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_occupancysensor_iHyVgifZuo/zap-generated/CHIPClusters.h @@ -33,21 +33,28 @@ namespace Controller { class DLL_EXPORT GroupsCluster : public ClusterBase { public: - GroupsCluster() : ClusterBase(app::Clusters::Groups::Id) {} + GroupsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Groups::Id, endpoint) + {} ~GroupsCluster() {} }; class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/CHIPClusters.h index bafdad080ae4c8..02e90e063f53ad 100644 --- a/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_onofflightswitch_FsPlMr090Q/zap-generated/CHIPClusters.h @@ -33,28 +33,37 @@ namespace Controller { class DLL_EXPORT ScenesCluster : public ClusterBase { public: - ScenesCluster() : ClusterBase(app::Clusters::Scenes::Id) {} + ScenesCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Scenes::Id, endpoint) + {} ~ScenesCluster() {} }; class DLL_EXPORT OnOffCluster : public ClusterBase { public: - OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} + OnOffCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OnOff::Id, endpoint) + {} ~OnOffCluster() {} }; class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/CHIPClusters.h index 85c73eaf003155..ae0e18dc059fa9 100644 --- a/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_onoffpluginunit_Wtf8ss5EBY/zap-generated/CHIPClusters.h @@ -33,14 +33,19 @@ namespace Controller { class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/CHIPClusters.h index d98f0914173eb9..a52eaf97f25d15 100644 --- a/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_pressuresensor_s0qC9wLH4k/zap-generated/CHIPClusters.h @@ -33,21 +33,28 @@ namespace Controller { class DLL_EXPORT GroupsCluster : public ClusterBase { public: - GroupsCluster() : ClusterBase(app::Clusters::Groups::Id) {} + GroupsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Groups::Id, endpoint) + {} ~GroupsCluster() {} }; class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/CHIPClusters.h index 85c73eaf003155..ae0e18dc059fa9 100644 --- a/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_speaker_RpzeXdimqA/zap-generated/CHIPClusters.h @@ -33,14 +33,19 @@ namespace Controller { class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/CHIPClusters.h index d98f0914173eb9..a52eaf97f25d15 100644 --- a/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_temperaturesensor_Qy1zkNW7c3/zap-generated/CHIPClusters.h @@ -33,21 +33,28 @@ namespace Controller { class DLL_EXPORT GroupsCluster : public ClusterBase { public: - GroupsCluster() : ClusterBase(app::Clusters::Groups::Id) {} + GroupsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Groups::Id, endpoint) + {} ~GroupsCluster() {} }; class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/CHIPClusters.h index 060843f2e5c9f1..4a0264cb96e02e 100644 --- a/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_thermostat_bm3fb8dhYi/zap-generated/CHIPClusters.h @@ -33,42 +33,57 @@ namespace Controller { class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; class DLL_EXPORT FanControlCluster : public ClusterBase { public: - FanControlCluster() : ClusterBase(app::Clusters::FanControl::Id) {} + FanControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::FanControl::Id, endpoint) + {} ~FanControlCluster() {} }; class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase { public: - TemperatureMeasurementCluster() : ClusterBase(app::Clusters::TemperatureMeasurement::Id) {} + TemperatureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TemperatureMeasurement::Id, endpoint) + {} ~TemperatureMeasurementCluster() {} }; class DLL_EXPORT RelativeHumidityMeasurementCluster : public ClusterBase { public: - RelativeHumidityMeasurementCluster() : ClusterBase(app::Clusters::RelativeHumidityMeasurement::Id) {} + RelativeHumidityMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::RelativeHumidityMeasurement::Id, endpoint) + {} ~RelativeHumidityMeasurementCluster() {} }; class DLL_EXPORT OccupancySensingCluster : public ClusterBase { public: - OccupancySensingCluster() : ClusterBase(app::Clusters::OccupancySensing::Id) {} + OccupancySensingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OccupancySensing::Id, endpoint) + {} ~OccupancySensingCluster() {} }; diff --git a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/CHIPClusters.h index 85c73eaf003155..ae0e18dc059fa9 100644 --- a/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/CHIPClusters.h +++ b/zzz_generated/chef-rootnode_windowcovering_RLCxaGi9Yx/zap-generated/CHIPClusters.h @@ -33,14 +33,19 @@ namespace Controller { class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 113b56ef9f3059..7b515c2ba51d21 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -33,448 +33,592 @@ namespace Controller { class DLL_EXPORT IdentifyCluster : public ClusterBase { public: - IdentifyCluster() : ClusterBase(app::Clusters::Identify::Id) {} + IdentifyCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Identify::Id, endpoint) + {} ~IdentifyCluster() {} }; class DLL_EXPORT GroupsCluster : public ClusterBase { public: - GroupsCluster() : ClusterBase(app::Clusters::Groups::Id) {} + GroupsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Groups::Id, endpoint) + {} ~GroupsCluster() {} }; class DLL_EXPORT ScenesCluster : public ClusterBase { public: - ScenesCluster() : ClusterBase(app::Clusters::Scenes::Id) {} + ScenesCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Scenes::Id, endpoint) + {} ~ScenesCluster() {} }; class DLL_EXPORT OnOffCluster : public ClusterBase { public: - OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} + OnOffCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OnOff::Id, endpoint) + {} ~OnOffCluster() {} }; class DLL_EXPORT OnOffSwitchConfigurationCluster : public ClusterBase { public: - OnOffSwitchConfigurationCluster() : ClusterBase(app::Clusters::OnOffSwitchConfiguration::Id) {} + OnOffSwitchConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OnOffSwitchConfiguration::Id, endpoint) + {} ~OnOffSwitchConfigurationCluster() {} }; class DLL_EXPORT LevelControlCluster : public ClusterBase { public: - LevelControlCluster() : ClusterBase(app::Clusters::LevelControl::Id) {} + LevelControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::LevelControl::Id, endpoint) + {} ~LevelControlCluster() {} }; class DLL_EXPORT BinaryInputBasicCluster : public ClusterBase { public: - BinaryInputBasicCluster() : ClusterBase(app::Clusters::BinaryInputBasic::Id) {} + BinaryInputBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::BinaryInputBasic::Id, endpoint) + {} ~BinaryInputBasicCluster() {} }; class DLL_EXPORT DescriptorCluster : public ClusterBase { public: - DescriptorCluster() : ClusterBase(app::Clusters::Descriptor::Id) {} + DescriptorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Descriptor::Id, endpoint) + {} ~DescriptorCluster() {} }; class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT AccessControlCluster : public ClusterBase { public: - AccessControlCluster() : ClusterBase(app::Clusters::AccessControl::Id) {} + AccessControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::AccessControl::Id, endpoint) + {} ~AccessControlCluster() {} }; class DLL_EXPORT BridgedActionsCluster : public ClusterBase { public: - BridgedActionsCluster() : ClusterBase(app::Clusters::BridgedActions::Id) {} + BridgedActionsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::BridgedActions::Id, endpoint) + {} ~BridgedActionsCluster() {} }; class DLL_EXPORT BasicCluster : public ClusterBase { public: - BasicCluster() : ClusterBase(app::Clusters::Basic::Id) {} + BasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Basic::Id, endpoint) + {} ~BasicCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateRequestorCluster : public ClusterBase { public: - OtaSoftwareUpdateRequestorCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateRequestor::Id) {} + OtaSoftwareUpdateRequestorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateRequestor::Id, endpoint) + {} ~OtaSoftwareUpdateRequestorCluster() {} }; class DLL_EXPORT LocalizationConfigurationCluster : public ClusterBase { public: - LocalizationConfigurationCluster() : ClusterBase(app::Clusters::LocalizationConfiguration::Id) {} + LocalizationConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::LocalizationConfiguration::Id, endpoint) + {} ~LocalizationConfigurationCluster() {} }; class DLL_EXPORT TimeFormatLocalizationCluster : public ClusterBase { public: - TimeFormatLocalizationCluster() : ClusterBase(app::Clusters::TimeFormatLocalization::Id) {} + TimeFormatLocalizationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TimeFormatLocalization::Id, endpoint) + {} ~TimeFormatLocalizationCluster() {} }; class DLL_EXPORT UnitLocalizationCluster : public ClusterBase { public: - UnitLocalizationCluster() : ClusterBase(app::Clusters::UnitLocalization::Id) {} + UnitLocalizationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::UnitLocalization::Id, endpoint) + {} ~UnitLocalizationCluster() {} }; class DLL_EXPORT PowerSourceConfigurationCluster : public ClusterBase { public: - PowerSourceConfigurationCluster() : ClusterBase(app::Clusters::PowerSourceConfiguration::Id) {} + PowerSourceConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::PowerSourceConfiguration::Id, endpoint) + {} ~PowerSourceConfigurationCluster() {} }; class DLL_EXPORT PowerSourceCluster : public ClusterBase { public: - PowerSourceCluster() : ClusterBase(app::Clusters::PowerSource::Id) {} + PowerSourceCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::PowerSource::Id, endpoint) + {} ~PowerSourceCluster() {} }; class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase { public: - GeneralCommissioningCluster() : ClusterBase(app::Clusters::GeneralCommissioning::Id) {} + GeneralCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::GeneralCommissioning::Id, endpoint) + {} ~GeneralCommissioningCluster() {} }; class DLL_EXPORT NetworkCommissioningCluster : public ClusterBase { public: - NetworkCommissioningCluster() : ClusterBase(app::Clusters::NetworkCommissioning::Id) {} + NetworkCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::NetworkCommissioning::Id, endpoint) + {} ~NetworkCommissioningCluster() {} }; class DLL_EXPORT DiagnosticLogsCluster : public ClusterBase { public: - DiagnosticLogsCluster() : ClusterBase(app::Clusters::DiagnosticLogs::Id) {} + DiagnosticLogsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::DiagnosticLogs::Id, endpoint) + {} ~DiagnosticLogsCluster() {} }; class DLL_EXPORT GeneralDiagnosticsCluster : public ClusterBase { public: - GeneralDiagnosticsCluster() : ClusterBase(app::Clusters::GeneralDiagnostics::Id) {} + GeneralDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::GeneralDiagnostics::Id, endpoint) + {} ~GeneralDiagnosticsCluster() {} }; class DLL_EXPORT SoftwareDiagnosticsCluster : public ClusterBase { public: - SoftwareDiagnosticsCluster() : ClusterBase(app::Clusters::SoftwareDiagnostics::Id) {} + SoftwareDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::SoftwareDiagnostics::Id, endpoint) + {} ~SoftwareDiagnosticsCluster() {} }; class DLL_EXPORT ThreadNetworkDiagnosticsCluster : public ClusterBase { public: - ThreadNetworkDiagnosticsCluster() : ClusterBase(app::Clusters::ThreadNetworkDiagnostics::Id) {} + ThreadNetworkDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ThreadNetworkDiagnostics::Id, endpoint) + {} ~ThreadNetworkDiagnosticsCluster() {} }; class DLL_EXPORT WiFiNetworkDiagnosticsCluster : public ClusterBase { public: - WiFiNetworkDiagnosticsCluster() : ClusterBase(app::Clusters::WiFiNetworkDiagnostics::Id) {} + WiFiNetworkDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::WiFiNetworkDiagnostics::Id, endpoint) + {} ~WiFiNetworkDiagnosticsCluster() {} }; class DLL_EXPORT EthernetNetworkDiagnosticsCluster : public ClusterBase { public: - EthernetNetworkDiagnosticsCluster() : ClusterBase(app::Clusters::EthernetNetworkDiagnostics::Id) {} + EthernetNetworkDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::EthernetNetworkDiagnostics::Id, endpoint) + {} ~EthernetNetworkDiagnosticsCluster() {} }; class DLL_EXPORT BridgedDeviceBasicCluster : public ClusterBase { public: - BridgedDeviceBasicCluster() : ClusterBase(app::Clusters::BridgedDeviceBasic::Id) {} + BridgedDeviceBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::BridgedDeviceBasic::Id, endpoint) + {} ~BridgedDeviceBasicCluster() {} }; class DLL_EXPORT SwitchCluster : public ClusterBase { public: - SwitchCluster() : ClusterBase(app::Clusters::Switch::Id) {} + SwitchCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Switch::Id, endpoint) + {} ~SwitchCluster() {} }; class DLL_EXPORT AdministratorCommissioningCluster : public ClusterBase { public: - AdministratorCommissioningCluster() : ClusterBase(app::Clusters::AdministratorCommissioning::Id) {} + AdministratorCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::AdministratorCommissioning::Id, endpoint) + {} ~AdministratorCommissioningCluster() {} }; class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase { public: - OperationalCredentialsCluster() : ClusterBase(app::Clusters::OperationalCredentials::Id) {} + OperationalCredentialsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OperationalCredentials::Id, endpoint) + {} ~OperationalCredentialsCluster() {} }; class DLL_EXPORT GroupKeyManagementCluster : public ClusterBase { public: - GroupKeyManagementCluster() : ClusterBase(app::Clusters::GroupKeyManagement::Id) {} + GroupKeyManagementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::GroupKeyManagement::Id, endpoint) + {} ~GroupKeyManagementCluster() {} }; class DLL_EXPORT FixedLabelCluster : public ClusterBase { public: - FixedLabelCluster() : ClusterBase(app::Clusters::FixedLabel::Id) {} + FixedLabelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::FixedLabel::Id, endpoint) + {} ~FixedLabelCluster() {} }; class DLL_EXPORT UserLabelCluster : public ClusterBase { public: - UserLabelCluster() : ClusterBase(app::Clusters::UserLabel::Id) {} + UserLabelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::UserLabel::Id, endpoint) + {} ~UserLabelCluster() {} }; class DLL_EXPORT BooleanStateCluster : public ClusterBase { public: - BooleanStateCluster() : ClusterBase(app::Clusters::BooleanState::Id) {} + BooleanStateCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::BooleanState::Id, endpoint) + {} ~BooleanStateCluster() {} }; class DLL_EXPORT ModeSelectCluster : public ClusterBase { public: - ModeSelectCluster() : ClusterBase(app::Clusters::ModeSelect::Id) {} + ModeSelectCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ModeSelect::Id, endpoint) + {} ~ModeSelectCluster() {} }; class DLL_EXPORT DoorLockCluster : public ClusterBase { public: - DoorLockCluster() : ClusterBase(app::Clusters::DoorLock::Id) {} + DoorLockCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::DoorLock::Id, endpoint) + {} ~DoorLockCluster() {} }; class DLL_EXPORT WindowCoveringCluster : public ClusterBase { public: - WindowCoveringCluster() : ClusterBase(app::Clusters::WindowCovering::Id) {} + WindowCoveringCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::WindowCovering::Id, endpoint) + {} ~WindowCoveringCluster() {} }; class DLL_EXPORT BarrierControlCluster : public ClusterBase { public: - BarrierControlCluster() : ClusterBase(app::Clusters::BarrierControl::Id) {} + BarrierControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::BarrierControl::Id, endpoint) + {} ~BarrierControlCluster() {} }; class DLL_EXPORT PumpConfigurationAndControlCluster : public ClusterBase { public: - PumpConfigurationAndControlCluster() : ClusterBase(app::Clusters::PumpConfigurationAndControl::Id) {} + PumpConfigurationAndControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::PumpConfigurationAndControl::Id, endpoint) + {} ~PumpConfigurationAndControlCluster() {} }; class DLL_EXPORT ThermostatCluster : public ClusterBase { public: - ThermostatCluster() : ClusterBase(app::Clusters::Thermostat::Id) {} + ThermostatCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Thermostat::Id, endpoint) + {} ~ThermostatCluster() {} }; class DLL_EXPORT FanControlCluster : public ClusterBase { public: - FanControlCluster() : ClusterBase(app::Clusters::FanControl::Id) {} + FanControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::FanControl::Id, endpoint) + {} ~FanControlCluster() {} }; class DLL_EXPORT ThermostatUserInterfaceConfigurationCluster : public ClusterBase { public: - ThermostatUserInterfaceConfigurationCluster() : ClusterBase(app::Clusters::ThermostatUserInterfaceConfiguration::Id) {} + ThermostatUserInterfaceConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ThermostatUserInterfaceConfiguration::Id, endpoint) + {} ~ThermostatUserInterfaceConfigurationCluster() {} }; class DLL_EXPORT ColorControlCluster : public ClusterBase { public: - ColorControlCluster() : ClusterBase(app::Clusters::ColorControl::Id) {} + ColorControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ColorControl::Id, endpoint) + {} ~ColorControlCluster() {} }; class DLL_EXPORT IlluminanceMeasurementCluster : public ClusterBase { public: - IlluminanceMeasurementCluster() : ClusterBase(app::Clusters::IlluminanceMeasurement::Id) {} + IlluminanceMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::IlluminanceMeasurement::Id, endpoint) + {} ~IlluminanceMeasurementCluster() {} }; class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase { public: - TemperatureMeasurementCluster() : ClusterBase(app::Clusters::TemperatureMeasurement::Id) {} + TemperatureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TemperatureMeasurement::Id, endpoint) + {} ~TemperatureMeasurementCluster() {} }; class DLL_EXPORT PressureMeasurementCluster : public ClusterBase { public: - PressureMeasurementCluster() : ClusterBase(app::Clusters::PressureMeasurement::Id) {} + PressureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::PressureMeasurement::Id, endpoint) + {} ~PressureMeasurementCluster() {} }; class DLL_EXPORT FlowMeasurementCluster : public ClusterBase { public: - FlowMeasurementCluster() : ClusterBase(app::Clusters::FlowMeasurement::Id) {} + FlowMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::FlowMeasurement::Id, endpoint) + {} ~FlowMeasurementCluster() {} }; class DLL_EXPORT RelativeHumidityMeasurementCluster : public ClusterBase { public: - RelativeHumidityMeasurementCluster() : ClusterBase(app::Clusters::RelativeHumidityMeasurement::Id) {} + RelativeHumidityMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::RelativeHumidityMeasurement::Id, endpoint) + {} ~RelativeHumidityMeasurementCluster() {} }; class DLL_EXPORT OccupancySensingCluster : public ClusterBase { public: - OccupancySensingCluster() : ClusterBase(app::Clusters::OccupancySensing::Id) {} + OccupancySensingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OccupancySensing::Id, endpoint) + {} ~OccupancySensingCluster() {} }; class DLL_EXPORT WakeOnLanCluster : public ClusterBase { public: - WakeOnLanCluster() : ClusterBase(app::Clusters::WakeOnLan::Id) {} + WakeOnLanCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::WakeOnLan::Id, endpoint) + {} ~WakeOnLanCluster() {} }; class DLL_EXPORT ChannelCluster : public ClusterBase { public: - ChannelCluster() : ClusterBase(app::Clusters::Channel::Id) {} + ChannelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Channel::Id, endpoint) + {} ~ChannelCluster() {} }; class DLL_EXPORT TargetNavigatorCluster : public ClusterBase { public: - TargetNavigatorCluster() : ClusterBase(app::Clusters::TargetNavigator::Id) {} + TargetNavigatorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TargetNavigator::Id, endpoint) + {} ~TargetNavigatorCluster() {} }; class DLL_EXPORT MediaPlaybackCluster : public ClusterBase { public: - MediaPlaybackCluster() : ClusterBase(app::Clusters::MediaPlayback::Id) {} + MediaPlaybackCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::MediaPlayback::Id, endpoint) + {} ~MediaPlaybackCluster() {} }; class DLL_EXPORT MediaInputCluster : public ClusterBase { public: - MediaInputCluster() : ClusterBase(app::Clusters::MediaInput::Id) {} + MediaInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::MediaInput::Id, endpoint) + {} ~MediaInputCluster() {} }; class DLL_EXPORT LowPowerCluster : public ClusterBase { public: - LowPowerCluster() : ClusterBase(app::Clusters::LowPower::Id) {} + LowPowerCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::LowPower::Id, endpoint) + {} ~LowPowerCluster() {} }; class DLL_EXPORT KeypadInputCluster : public ClusterBase { public: - KeypadInputCluster() : ClusterBase(app::Clusters::KeypadInput::Id) {} + KeypadInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::KeypadInput::Id, endpoint) + {} ~KeypadInputCluster() {} }; class DLL_EXPORT ContentLauncherCluster : public ClusterBase { public: - ContentLauncherCluster() : ClusterBase(app::Clusters::ContentLauncher::Id) {} + ContentLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ContentLauncher::Id, endpoint) + {} ~ContentLauncherCluster() {} }; class DLL_EXPORT AudioOutputCluster : public ClusterBase { public: - AudioOutputCluster() : ClusterBase(app::Clusters::AudioOutput::Id) {} + AudioOutputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::AudioOutput::Id, endpoint) + {} ~AudioOutputCluster() {} }; class DLL_EXPORT ApplicationLauncherCluster : public ClusterBase { public: - ApplicationLauncherCluster() : ClusterBase(app::Clusters::ApplicationLauncher::Id) {} + ApplicationLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ApplicationLauncher::Id, endpoint) + {} ~ApplicationLauncherCluster() {} }; class DLL_EXPORT ApplicationBasicCluster : public ClusterBase { public: - ApplicationBasicCluster() : ClusterBase(app::Clusters::ApplicationBasic::Id) {} + ApplicationBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ApplicationBasic::Id, endpoint) + {} ~ApplicationBasicCluster() {} }; class DLL_EXPORT AccountLoginCluster : public ClusterBase { public: - AccountLoginCluster() : ClusterBase(app::Clusters::AccountLogin::Id) {} + AccountLoginCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::AccountLogin::Id, endpoint) + {} ~AccountLoginCluster() {} }; class DLL_EXPORT ElectricalMeasurementCluster : public ClusterBase { public: - ElectricalMeasurementCluster() : ClusterBase(app::Clusters::ElectricalMeasurement::Id) {} + ElectricalMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ElectricalMeasurement::Id, endpoint) + {} ~ElectricalMeasurementCluster() {} }; class DLL_EXPORT TestClusterCluster : public ClusterBase { public: - TestClusterCluster() : ClusterBase(app::Clusters::TestCluster::Id) {} + TestClusterCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TestCluster::Id, endpoint) + {} ~TestClusterCluster() {} }; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/MTRTestClustersObjc.mm b/zzz_generated/darwin-framework-tool/zap-generated/cluster/MTRTestClustersObjc.mm index 559116a179cee9..51f61faf733325 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/MTRTestClustersObjc.mm +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/MTRTestClustersObjc.mm @@ -41,12 +41,13 @@ using namespace chip::app::Clusters; @interface MTRTestIdentify () -@property (readonly) chip::Controller::IdentifyCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::IdentifyCluster * cppCluster; @end @implementation MTRTestIdentify -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::IdentifyCluster **)cppClusterSlot { return &_cppCluster; } @@ -65,7 +66,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -104,7 +105,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -143,7 +144,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -182,7 +183,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -200,7 +201,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -218,19 +219,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestGroups () -@property (readonly) chip::Controller::GroupsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GroupsCluster * cppCluster; @end @implementation MTRTestGroups -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::GroupsCluster **)cppClusterSlot { return &_cppCluster; } @@ -249,7 +251,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -288,7 +290,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -327,7 +329,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -366,7 +368,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -384,7 +386,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -402,19 +404,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestScenes () -@property (readonly) chip::Controller::ScenesCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ScenesCluster * cppCluster; @end @implementation MTRTestScenes -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ScenesCluster **)cppClusterSlot { return &_cppCluster; } @@ -433,7 +436,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -451,7 +454,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -469,7 +472,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -487,7 +490,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -505,7 +508,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -528,7 +531,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -567,7 +570,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -606,7 +609,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -645,7 +648,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -663,7 +666,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -681,19 +684,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestOnOff () -@property (readonly) chip::Controller::OnOffCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OnOffCluster * cppCluster; @end @implementation MTRTestOnOff -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::OnOffCluster **)cppClusterSlot { return &_cppCluster; } @@ -712,7 +716,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -730,7 +734,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -769,7 +773,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -808,7 +812,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -847,7 +851,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -865,7 +869,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -883,19 +887,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestOnOffSwitchConfiguration () -@property (readonly) chip::Controller::OnOffSwitchConfigurationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OnOffSwitchConfigurationCluster * cppCluster; @end @implementation MTRTestOnOffSwitchConfiguration -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::OnOffSwitchConfigurationCluster **)cppClusterSlot { return &_cppCluster; } @@ -914,7 +919,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -953,7 +958,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -992,7 +997,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1031,7 +1036,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1049,7 +1054,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1067,19 +1072,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestLevelControl () -@property (readonly) chip::Controller::LevelControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::LevelControlCluster * cppCluster; @end @implementation MTRTestLevelControl -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::LevelControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -1098,7 +1104,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1116,7 +1122,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1134,7 +1140,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1152,7 +1158,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1170,7 +1176,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1188,7 +1194,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1206,7 +1212,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1245,7 +1251,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1284,7 +1290,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1323,7 +1329,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1341,7 +1347,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1359,19 +1365,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestBinaryInputBasic () -@property (readonly) chip::Controller::BinaryInputBasicCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BinaryInputBasicCluster * cppCluster; @end @implementation MTRTestBinaryInputBasic -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::BinaryInputBasicCluster **)cppClusterSlot { return &_cppCluster; } @@ -1390,7 +1397,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1408,7 +1415,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1426,7 +1433,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1465,7 +1472,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1504,7 +1511,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1543,7 +1550,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1561,7 +1568,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1579,19 +1586,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestDescriptor () -@property (readonly) chip::Controller::DescriptorCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::DescriptorCluster * cppCluster; @end @implementation MTRTestDescriptor -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::DescriptorCluster **)cppClusterSlot { return &_cppCluster; } @@ -1632,7 +1640,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1671,7 +1679,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1710,7 +1718,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1749,7 +1757,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1788,7 +1796,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1827,7 +1835,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1866,7 +1874,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1884,7 +1892,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1902,19 +1910,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestBinding () -@property (readonly) chip::Controller::BindingCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BindingCluster * cppCluster; @end @implementation MTRTestBinding -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::BindingCluster **)cppClusterSlot { return &_cppCluster; } @@ -1954,7 +1963,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -1993,7 +2002,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2032,7 +2041,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2050,7 +2059,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2068,19 +2077,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestAccessControl () -@property (readonly) chip::Controller::AccessControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AccessControlCluster * cppCluster; @end @implementation MTRTestAccessControl -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::AccessControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -2100,7 +2110,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2119,7 +2129,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2138,7 +2148,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2177,7 +2187,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2216,7 +2226,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2255,7 +2265,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2273,7 +2283,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2291,19 +2301,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestBridgedActions () -@property (readonly) chip::Controller::BridgedActionsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BridgedActionsCluster * cppCluster; @end @implementation MTRTestBridgedActions -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::BridgedActionsCluster **)cppClusterSlot { return &_cppCluster; } @@ -2352,7 +2363,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2417,7 +2428,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2435,7 +2446,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2474,7 +2485,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2513,7 +2524,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2552,7 +2563,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2570,7 +2581,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2588,19 +2599,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestBasic () -@property (readonly) chip::Controller::BasicCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BasicCluster * cppCluster; @end @implementation MTRTestBasic -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::BasicCluster **)cppClusterSlot { return &_cppCluster; } @@ -2619,7 +2631,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2637,7 +2649,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2655,7 +2667,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2673,7 +2685,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2691,7 +2703,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2709,7 +2721,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2728,7 +2740,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2746,7 +2758,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2765,7 +2777,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2783,7 +2795,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2801,7 +2813,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2819,7 +2831,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2837,7 +2849,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2855,7 +2867,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2873,7 +2885,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2891,7 +2903,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2911,7 +2923,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue.subscriptionsPerFabric = value.subscriptionsPerFabric.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2950,7 +2962,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -2989,7 +3001,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3028,7 +3040,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3046,7 +3058,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3064,19 +3076,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestOtaSoftwareUpdateProvider () -@property (readonly) chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OtaSoftwareUpdateProviderCluster * cppCluster; @end @implementation MTRTestOtaSoftwareUpdateProvider -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::OtaSoftwareUpdateProviderCluster **)cppClusterSlot { return &_cppCluster; } @@ -3116,7 +3129,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3155,7 +3168,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3194,7 +3207,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3212,7 +3225,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3230,19 +3243,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestOtaSoftwareUpdateRequestor () -@property (readonly) chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OtaSoftwareUpdateRequestorCluster * cppCluster; @end @implementation MTRTestOtaSoftwareUpdateRequestor -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::OtaSoftwareUpdateRequestorCluster **)cppClusterSlot { return &_cppCluster; } @@ -3261,7 +3275,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3279,7 +3293,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3302,7 +3316,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3341,7 +3355,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3380,7 +3394,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3419,7 +3433,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3437,7 +3451,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3455,19 +3469,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestLocalizationConfiguration () -@property (readonly) chip::Controller::LocalizationConfigurationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::LocalizationConfigurationCluster * cppCluster; @end @implementation MTRTestLocalizationConfiguration -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::LocalizationConfigurationCluster **)cppClusterSlot { return &_cppCluster; } @@ -3507,7 +3522,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3546,7 +3561,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3585,7 +3600,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3624,7 +3639,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3642,7 +3657,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3660,19 +3675,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestTimeFormatLocalization () -@property (readonly) chip::Controller::TimeFormatLocalizationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TimeFormatLocalizationCluster * cppCluster; @end @implementation MTRTestTimeFormatLocalization -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::TimeFormatLocalizationCluster **)cppClusterSlot { return &_cppCluster; } @@ -3714,7 +3730,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3753,7 +3769,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3792,7 +3808,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3831,7 +3847,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3849,7 +3865,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3867,19 +3883,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestUnitLocalization () -@property (readonly) chip::Controller::UnitLocalizationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::UnitLocalizationCluster * cppCluster; @end @implementation MTRTestUnitLocalization -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::UnitLocalizationCluster **)cppClusterSlot { return &_cppCluster; } @@ -3919,7 +3936,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3958,7 +3975,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -3997,7 +4014,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4015,7 +4032,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4033,19 +4050,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestPowerSourceConfiguration () -@property (readonly) chip::Controller::PowerSourceConfigurationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PowerSourceConfigurationCluster * cppCluster; @end @implementation MTRTestPowerSourceConfiguration -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::PowerSourceConfigurationCluster **)cppClusterSlot { return &_cppCluster; } @@ -4085,7 +4103,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4124,7 +4142,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4163,7 +4181,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4202,7 +4220,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4220,7 +4238,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4238,19 +4256,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestPowerSource () -@property (readonly) chip::Controller::PowerSourceCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PowerSourceCluster * cppCluster; @end @implementation MTRTestPowerSource -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::PowerSourceCluster **)cppClusterSlot { return &_cppCluster; } @@ -4269,7 +4288,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4287,7 +4306,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4305,7 +4324,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4324,7 +4343,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4343,7 +4362,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4361,7 +4380,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4379,7 +4398,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4397,7 +4416,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4415,7 +4434,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4433,7 +4452,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4472,7 +4491,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4490,7 +4509,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4509,7 +4528,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4527,7 +4546,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4545,7 +4564,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4564,7 +4583,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4583,7 +4602,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4601,7 +4620,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4640,7 +4659,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4659,7 +4678,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4678,7 +4697,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4697,7 +4716,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4716,7 +4735,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4735,7 +4754,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4753,7 +4772,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4771,7 +4790,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4789,7 +4808,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4808,7 +4827,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4827,7 +4846,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4846,7 +4865,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4886,7 +4905,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4925,7 +4944,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -4964,7 +4983,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5003,7 +5022,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5021,7 +5040,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5039,19 +5058,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestGeneralCommissioning () -@property (readonly) chip::Controller::GeneralCommissioningCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GeneralCommissioningCluster * cppCluster; @end @implementation MTRTestGeneralCommissioning -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::GeneralCommissioningCluster **)cppClusterSlot { return &_cppCluster; } @@ -5072,7 +5092,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue.maxCumulativeFailsafeSeconds = value.maxCumulativeFailsafeSeconds.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5090,7 +5110,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5108,7 +5128,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5127,7 +5147,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5166,7 +5186,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5205,7 +5225,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5244,7 +5264,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5262,7 +5282,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5280,19 +5300,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestNetworkCommissioning () -@property (readonly) chip::Controller::NetworkCommissioningCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::NetworkCommissioningCluster * cppCluster; @end @implementation MTRTestNetworkCommissioning -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::NetworkCommissioningCluster **)cppClusterSlot { return &_cppCluster; } @@ -5311,7 +5332,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5351,7 +5372,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5369,7 +5390,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5388,7 +5409,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5412,7 +5433,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5435,7 +5456,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5459,7 +5480,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5498,7 +5519,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5537,7 +5558,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5576,7 +5597,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5594,7 +5615,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5612,19 +5633,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestDiagnosticLogs () -@property (readonly) chip::Controller::DiagnosticLogsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::DiagnosticLogsCluster * cppCluster; @end @implementation MTRTestDiagnosticLogs -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::DiagnosticLogsCluster **)cppClusterSlot { return &_cppCluster; } @@ -5664,7 +5686,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5703,7 +5725,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5742,7 +5764,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5760,7 +5782,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5778,19 +5800,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestGeneralDiagnostics () -@property (readonly) chip::Controller::GeneralDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GeneralDiagnosticsCluster * cppCluster; @end @implementation MTRTestGeneralDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::GeneralDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -5893,7 +5916,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5911,7 +5934,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5929,7 +5952,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5948,7 +5971,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -5966,7 +5989,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6005,7 +6028,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6044,7 +6067,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6083,7 +6106,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6102,7 +6125,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6141,7 +6164,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6180,7 +6203,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6219,7 +6242,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6237,7 +6260,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6255,19 +6278,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestSoftwareDiagnostics () -@property (readonly) chip::Controller::SoftwareDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::SoftwareDiagnosticsCluster * cppCluster; @end @implementation MTRTestSoftwareDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::SoftwareDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -6323,7 +6347,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6341,7 +6365,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6359,7 +6383,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6378,7 +6402,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6417,7 +6441,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6456,7 +6480,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6495,7 +6519,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6513,7 +6537,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6531,19 +6555,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestThreadNetworkDiagnostics () -@property (readonly) chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ThreadNetworkDiagnosticsCluster * cppCluster; @end @implementation MTRTestThreadNetworkDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ThreadNetworkDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -6567,7 +6592,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6590,7 +6615,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6613,7 +6638,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6636,7 +6661,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6659,7 +6684,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6682,7 +6707,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6700,7 +6725,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6762,7 +6787,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6810,7 +6835,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6833,7 +6858,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6856,7 +6881,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6879,7 +6904,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6902,7 +6927,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6925,7 +6950,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6943,7 +6968,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6961,7 +6986,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6979,7 +7004,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -6997,7 +7022,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7015,7 +7040,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7034,7 +7059,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7053,7 +7078,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7071,7 +7096,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7089,7 +7114,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7107,7 +7132,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7125,7 +7150,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7143,7 +7168,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7161,7 +7186,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7180,7 +7205,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7198,7 +7223,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7216,7 +7241,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7234,7 +7259,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7252,7 +7277,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7270,7 +7295,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7288,7 +7313,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7307,7 +7332,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7326,7 +7351,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7344,7 +7369,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7362,7 +7387,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7381,7 +7406,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7399,7 +7424,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7417,7 +7442,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7435,7 +7460,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7453,7 +7478,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7471,7 +7496,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7489,7 +7514,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7507,7 +7532,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7525,7 +7550,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7544,7 +7569,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7563,7 +7588,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7581,7 +7606,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7599,7 +7624,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7618,7 +7643,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7637,7 +7662,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7655,7 +7680,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7673,7 +7698,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7691,7 +7716,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7714,7 +7739,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7737,7 +7762,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7760,7 +7785,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7785,7 +7810,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7808,7 +7833,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7844,7 +7869,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7885,7 +7910,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7924,7 +7949,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -7963,7 +7988,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8002,7 +8027,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8020,7 +8045,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8038,19 +8063,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestWiFiNetworkDiagnostics () -@property (readonly) chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::WiFiNetworkDiagnosticsCluster * cppCluster; @end @implementation MTRTestWiFiNetworkDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::WiFiNetworkDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -8074,7 +8100,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8097,7 +8123,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8120,7 +8146,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8143,7 +8169,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8166,7 +8192,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8184,7 +8210,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8202,7 +8228,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8221,7 +8247,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8240,7 +8266,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8258,7 +8284,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8276,7 +8302,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8294,7 +8320,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8312,7 +8338,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8351,7 +8377,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8390,7 +8416,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8429,7 +8455,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8447,7 +8473,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8465,19 +8491,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestEthernetNetworkDiagnostics () -@property (readonly) chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::EthernetNetworkDiagnosticsCluster * cppCluster; @end @implementation MTRTestEthernetNetworkDiagnostics -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::EthernetNetworkDiagnosticsCluster **)cppClusterSlot { return &_cppCluster; } @@ -8501,7 +8528,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8524,7 +8551,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8542,7 +8569,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8560,7 +8587,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8578,7 +8605,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8596,7 +8623,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8614,7 +8641,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8637,7 +8664,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8655,7 +8682,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8694,7 +8721,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8733,7 +8760,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8772,7 +8799,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8790,7 +8817,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8808,19 +8835,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestBridgedDeviceBasic () -@property (readonly) chip::Controller::BridgedDeviceBasicCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BridgedDeviceBasicCluster * cppCluster; @end @implementation MTRTestBridgedDeviceBasic -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::BridgedDeviceBasicCluster **)cppClusterSlot { return &_cppCluster; } @@ -8839,7 +8867,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8857,7 +8885,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8875,7 +8903,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8893,7 +8921,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8912,7 +8940,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8930,7 +8958,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8949,7 +8977,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8967,7 +8995,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -8985,7 +9013,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9003,7 +9031,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9021,7 +9049,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9039,7 +9067,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9057,7 +9085,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9075,7 +9103,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9114,7 +9142,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9153,7 +9181,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9192,7 +9220,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9210,7 +9238,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9228,19 +9256,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestSwitch () -@property (readonly) chip::Controller::SwitchCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::SwitchCluster * cppCluster; @end @implementation MTRTestSwitch -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::SwitchCluster **)cppClusterSlot { return &_cppCluster; } @@ -9259,7 +9288,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9277,7 +9306,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9295,7 +9324,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9334,7 +9363,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9373,7 +9402,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9412,7 +9441,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9430,7 +9459,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9448,19 +9477,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestAdministratorCommissioning () -@property (readonly) chip::Controller::AdministratorCommissioningCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AdministratorCommissioningCluster * cppCluster; @end @implementation MTRTestAdministratorCommissioning -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::AdministratorCommissioningCluster **)cppClusterSlot { return &_cppCluster; } @@ -9479,7 +9509,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9497,7 +9527,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9515,7 +9545,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9554,7 +9584,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9593,7 +9623,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9632,7 +9662,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9650,7 +9680,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9668,19 +9698,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestOperationalCredentials () -@property (readonly) chip::Controller::OperationalCredentialsCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OperationalCredentialsCluster * cppCluster; @end @implementation MTRTestOperationalCredentials -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::OperationalCredentialsCluster **)cppClusterSlot { return &_cppCluster; } @@ -9727,7 +9758,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9773,7 +9804,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9791,7 +9822,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9809,7 +9840,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9849,7 +9880,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9867,7 +9898,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9906,7 +9937,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9945,7 +9976,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -9984,7 +10015,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10002,7 +10033,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10020,19 +10051,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestGroupKeyManagement () -@property (readonly) chip::Controller::GroupKeyManagementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::GroupKeyManagementCluster * cppCluster; @end @implementation MTRTestGroupKeyManagement -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::GroupKeyManagementCluster **)cppClusterSlot { return &_cppCluster; } @@ -10099,7 +10131,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10117,7 +10149,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10136,7 +10168,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10175,7 +10207,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10214,7 +10246,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10253,7 +10285,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10271,7 +10303,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10289,19 +10321,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestFixedLabel () -@property (readonly) chip::Controller::FixedLabelCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::FixedLabelCluster * cppCluster; @end @implementation MTRTestFixedLabel -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::FixedLabelCluster **)cppClusterSlot { return &_cppCluster; } @@ -10342,7 +10375,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10381,7 +10414,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10420,7 +10453,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10459,7 +10492,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10477,7 +10510,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10495,19 +10528,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestUserLabel () -@property (readonly) chip::Controller::UserLabelCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::UserLabelCluster * cppCluster; @end @implementation MTRTestUserLabel -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::UserLabelCluster **)cppClusterSlot { return &_cppCluster; } @@ -10547,7 +10581,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10586,7 +10620,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10625,7 +10659,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10643,7 +10677,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10661,19 +10695,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestBooleanState () -@property (readonly) chip::Controller::BooleanStateCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BooleanStateCluster * cppCluster; @end @implementation MTRTestBooleanState -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::BooleanStateCluster **)cppClusterSlot { return &_cppCluster; } @@ -10692,7 +10727,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10731,7 +10766,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10770,7 +10805,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10809,7 +10844,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10827,7 +10862,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10845,19 +10880,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestModeSelect () -@property (readonly) chip::Controller::ModeSelectCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ModeSelectCluster * cppCluster; @end @implementation MTRTestModeSelect -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ModeSelectCluster **)cppClusterSlot { return &_cppCluster; } @@ -10876,7 +10912,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10899,7 +10935,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10963,7 +10999,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -10981,7 +11017,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11020,7 +11056,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11059,7 +11095,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11098,7 +11134,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11116,7 +11152,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11134,19 +11170,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestDoorLock () -@property (readonly) chip::Controller::DoorLockCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::DoorLockCluster * cppCluster; @end @implementation MTRTestDoorLock -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::DoorLockCluster **)cppClusterSlot { return &_cppCluster; } @@ -11170,7 +11207,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11188,7 +11225,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11206,7 +11243,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11229,7 +11266,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11248,7 +11285,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11267,7 +11304,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11286,7 +11323,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11305,7 +11342,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11324,7 +11361,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11343,7 +11380,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11361,7 +11398,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11379,7 +11416,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11397,7 +11434,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11415,7 +11452,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11434,7 +11471,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11453,7 +11490,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11472,7 +11509,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11491,7 +11528,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11530,7 +11567,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11569,7 +11606,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11608,7 +11645,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11626,7 +11663,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11644,19 +11681,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestWindowCovering () -@property (readonly) chip::Controller::WindowCoveringCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::WindowCoveringCluster * cppCluster; @end @implementation MTRTestWindowCovering -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::WindowCoveringCluster **)cppClusterSlot { return &_cppCluster; } @@ -11675,7 +11713,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11694,7 +11732,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11713,7 +11751,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11736,7 +11774,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11759,7 +11797,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11778,7 +11816,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11797,7 +11835,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11815,7 +11853,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11839,7 +11877,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11863,7 +11901,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11881,7 +11919,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11905,7 +11943,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11929,7 +11967,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11947,7 +11985,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11971,7 +12009,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -11995,7 +12033,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12014,7 +12052,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12033,7 +12071,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12052,7 +12090,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12071,7 +12109,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12089,7 +12127,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12128,7 +12166,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12167,7 +12205,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12206,7 +12244,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12224,7 +12262,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12242,19 +12280,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestBarrierControl () -@property (readonly) chip::Controller::BarrierControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::BarrierControlCluster * cppCluster; @end @implementation MTRTestBarrierControl -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::BarrierControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -12273,7 +12312,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12291,7 +12330,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12309,7 +12348,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12327,7 +12366,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12366,7 +12405,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12405,7 +12444,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12444,7 +12483,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12462,7 +12501,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12480,19 +12519,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestPumpConfigurationAndControl () -@property (readonly) chip::Controller::PumpConfigurationAndControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PumpConfigurationAndControlCluster * cppCluster; @end @implementation MTRTestPumpConfigurationAndControl -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::PumpConfigurationAndControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -12516,7 +12556,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12539,7 +12579,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12562,7 +12602,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12585,7 +12625,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12608,7 +12648,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12631,7 +12671,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12654,7 +12694,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12677,7 +12717,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12700,7 +12740,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12723,7 +12763,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12746,7 +12786,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12769,7 +12809,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12792,7 +12832,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12810,7 +12850,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12829,7 +12869,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12847,7 +12887,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12870,7 +12910,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12893,7 +12933,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12916,7 +12956,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12955,7 +12995,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -12994,7 +13034,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13033,7 +13073,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13051,7 +13091,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13069,19 +13109,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestThermostat () -@property (readonly) chip::Controller::ThermostatCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ThermostatCluster * cppCluster; @end @implementation MTRTestThermostat -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ThermostatCluster **)cppClusterSlot { return &_cppCluster; } @@ -13105,7 +13146,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13128,7 +13169,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13146,7 +13187,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13165,7 +13206,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13184,7 +13225,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13203,7 +13244,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13222,7 +13263,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13240,7 +13281,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13258,7 +13299,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13277,7 +13318,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13295,7 +13336,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13314,7 +13355,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13333,7 +13374,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13352,7 +13393,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13370,7 +13411,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13394,7 +13435,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13413,7 +13454,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13436,7 +13477,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13459,7 +13500,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13483,7 +13524,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13507,7 +13548,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13530,7 +13571,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13569,7 +13610,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13608,7 +13649,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13647,7 +13688,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13665,7 +13706,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13683,19 +13724,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestFanControl () -@property (readonly) chip::Controller::FanControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::FanControlCluster * cppCluster; @end @implementation MTRTestFanControl -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::FanControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -13714,7 +13756,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13732,7 +13774,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13750,7 +13792,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13768,7 +13810,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13786,7 +13828,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13825,7 +13867,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13864,7 +13906,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13903,7 +13945,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13921,7 +13963,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -13939,19 +13981,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestThermostatUserInterfaceConfiguration () -@property (readonly) chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ThermostatUserInterfaceConfigurationCluster * cppCluster; @end @implementation MTRTestThermostatUserInterfaceConfiguration -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ThermostatUserInterfaceConfigurationCluster **)cppClusterSlot { return &_cppCluster; } @@ -13991,7 +14034,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14030,7 +14073,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14069,7 +14112,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14087,7 +14130,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14105,19 +14148,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestColorControl () -@property (readonly) chip::Controller::ColorControlCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ColorControlCluster * cppCluster; @end @implementation MTRTestColorControl -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ColorControlCluster **)cppClusterSlot { return &_cppCluster; } @@ -14136,7 +14180,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14154,7 +14198,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14172,7 +14216,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14190,7 +14234,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14208,7 +14252,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14226,7 +14270,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14244,7 +14288,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14262,7 +14306,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14280,7 +14324,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14303,7 +14347,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14321,7 +14365,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14339,7 +14383,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14362,7 +14406,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14380,7 +14424,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14398,7 +14442,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14421,7 +14465,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14439,7 +14483,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14457,7 +14501,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14480,7 +14524,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14498,7 +14542,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14516,7 +14560,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14539,7 +14583,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14557,7 +14601,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14575,7 +14619,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14598,7 +14642,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14616,7 +14660,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14634,7 +14678,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14657,7 +14701,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14675,7 +14719,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14693,7 +14737,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14711,7 +14755,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14729,7 +14773,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14747,7 +14791,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14766,7 +14810,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14785,7 +14829,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14803,7 +14847,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14822,7 +14866,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14841,7 +14885,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14860,7 +14904,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14899,7 +14943,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14938,7 +14982,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14977,7 +15021,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -14995,7 +15039,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15013,19 +15057,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestIlluminanceMeasurement () -@property (readonly) chip::Controller::IlluminanceMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::IlluminanceMeasurementCluster * cppCluster; @end @implementation MTRTestIlluminanceMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::IlluminanceMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -15049,7 +15094,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15072,7 +15117,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15095,7 +15140,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15113,7 +15158,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15136,7 +15181,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15175,7 +15220,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15214,7 +15259,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15253,7 +15298,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15271,7 +15316,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15289,19 +15334,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestTemperatureMeasurement () -@property (readonly) chip::Controller::TemperatureMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TemperatureMeasurementCluster * cppCluster; @end @implementation MTRTestTemperatureMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::TemperatureMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -15325,7 +15371,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15348,7 +15394,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15371,7 +15417,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15389,7 +15435,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15428,7 +15474,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15467,7 +15513,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15506,7 +15552,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15524,7 +15570,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15542,19 +15588,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestPressureMeasurement () -@property (readonly) chip::Controller::PressureMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::PressureMeasurementCluster * cppCluster; @end @implementation MTRTestPressureMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::PressureMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -15578,7 +15625,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15601,7 +15648,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15624,7 +15671,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15642,7 +15689,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15665,7 +15712,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15688,7 +15735,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15711,7 +15758,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15729,7 +15776,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15747,7 +15794,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15786,7 +15833,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15825,7 +15872,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15864,7 +15911,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15882,7 +15929,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15900,19 +15947,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestFlowMeasurement () -@property (readonly) chip::Controller::FlowMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::FlowMeasurementCluster * cppCluster; @end @implementation MTRTestFlowMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::FlowMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -15936,7 +15984,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15959,7 +16007,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -15982,7 +16030,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16000,7 +16048,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16039,7 +16087,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16078,7 +16126,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16117,7 +16165,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16135,7 +16183,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16153,19 +16201,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestRelativeHumidityMeasurement () -@property (readonly) chip::Controller::RelativeHumidityMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::RelativeHumidityMeasurementCluster * cppCluster; @end @implementation MTRTestRelativeHumidityMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::RelativeHumidityMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -16189,7 +16238,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16212,7 +16261,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16235,7 +16284,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16253,7 +16302,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16292,7 +16341,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16331,7 +16380,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16370,7 +16419,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16388,7 +16437,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16406,19 +16455,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestOccupancySensing () -@property (readonly) chip::Controller::OccupancySensingCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::OccupancySensingCluster * cppCluster; @end @implementation MTRTestOccupancySensing -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::OccupancySensingCluster **)cppClusterSlot { return &_cppCluster; } @@ -16437,7 +16487,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16455,7 +16505,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16474,7 +16524,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16513,7 +16563,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16552,7 +16602,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16591,7 +16641,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16609,7 +16659,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16627,19 +16677,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestWakeOnLan () -@property (readonly) chip::Controller::WakeOnLanCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::WakeOnLanCluster * cppCluster; @end @implementation MTRTestWakeOnLan -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::WakeOnLanCluster **)cppClusterSlot { return &_cppCluster; } @@ -16658,7 +16709,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16697,7 +16748,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16736,7 +16787,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16775,7 +16826,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16793,7 +16844,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16811,19 +16862,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestChannel () -@property (readonly) chip::Controller::ChannelCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ChannelCluster * cppCluster; @end @implementation MTRTestChannel -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ChannelCluster **)cppClusterSlot { return &_cppCluster; } @@ -16876,7 +16928,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16910,7 +16962,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16947,7 +16999,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -16986,7 +17038,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17025,7 +17077,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17064,7 +17116,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17082,7 +17134,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17100,19 +17152,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestTargetNavigator () -@property (readonly) chip::Controller::TargetNavigatorCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TargetNavigatorCluster * cppCluster; @end @implementation MTRTestTargetNavigator -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::TargetNavigatorCluster **)cppClusterSlot { return &_cppCluster; } @@ -17153,7 +17206,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17171,7 +17224,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17210,7 +17263,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17249,7 +17302,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17288,7 +17341,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17306,7 +17359,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17324,19 +17377,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestMediaPlayback () -@property (readonly) chip::Controller::MediaPlaybackCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::MediaPlaybackCluster * cppCluster; @end @implementation MTRTestMediaPlayback -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::MediaPlaybackCluster **)cppClusterSlot { return &_cppCluster; } @@ -17355,7 +17409,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17378,7 +17432,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17401,7 +17455,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17431,7 +17485,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17449,7 +17503,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.floatValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17472,7 +17526,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17495,7 +17549,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17534,7 +17588,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17573,7 +17627,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17612,7 +17666,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17630,7 +17684,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17648,19 +17702,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestMediaInput () -@property (readonly) chip::Controller::MediaInputCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::MediaInputCluster * cppCluster; @end @implementation MTRTestMediaInput -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::MediaInputCluster **)cppClusterSlot { return &_cppCluster; } @@ -17705,7 +17760,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17723,7 +17778,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17762,7 +17817,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17801,7 +17856,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17840,7 +17895,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17858,7 +17913,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17876,19 +17931,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestLowPower () -@property (readonly) chip::Controller::LowPowerCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::LowPowerCluster * cppCluster; @end @implementation MTRTestLowPower -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::LowPowerCluster **)cppClusterSlot { return &_cppCluster; } @@ -17928,7 +17984,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -17967,7 +18023,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18006,7 +18062,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18024,7 +18080,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18042,19 +18098,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestKeypadInput () -@property (readonly) chip::Controller::KeypadInputCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::KeypadInputCluster * cppCluster; @end @implementation MTRTestKeypadInput -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::KeypadInputCluster **)cppClusterSlot { return &_cppCluster; } @@ -18094,7 +18151,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18133,7 +18190,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18172,7 +18229,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18190,7 +18247,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18208,19 +18265,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestContentLauncher () -@property (readonly) chip::Controller::ContentLauncherCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ContentLauncherCluster * cppCluster; @end @implementation MTRTestContentLauncher -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ContentLauncherCluster **)cppClusterSlot { return &_cppCluster; } @@ -18260,7 +18318,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18299,7 +18357,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18338,7 +18396,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18377,7 +18435,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18395,7 +18453,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18413,19 +18471,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestAudioOutput () -@property (readonly) chip::Controller::AudioOutputCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AudioOutputCluster * cppCluster; @end @implementation MTRTestAudioOutput -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::AudioOutputCluster **)cppClusterSlot { return &_cppCluster; } @@ -18469,7 +18528,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18487,7 +18546,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18526,7 +18585,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18565,7 +18624,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18604,7 +18663,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18622,7 +18681,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18640,19 +18699,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestApplicationLauncher () -@property (readonly) chip::Controller::ApplicationLauncherCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ApplicationLauncherCluster * cppCluster; @end @implementation MTRTestApplicationLauncher -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ApplicationLauncherCluster **)cppClusterSlot { return &_cppCluster; } @@ -18692,7 +18752,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18731,7 +18791,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18770,7 +18830,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18809,7 +18869,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18827,7 +18887,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18845,19 +18905,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestApplicationBasic () -@property (readonly) chip::Controller::ApplicationBasicCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ApplicationBasicCluster * cppCluster; @end @implementation MTRTestApplicationBasic -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ApplicationBasicCluster **)cppClusterSlot { return &_cppCluster; } @@ -18876,7 +18937,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18894,7 +18955,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18912,7 +18973,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18930,7 +18991,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18950,7 +19011,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue.applicationId = [self asCharSpan:value.applicationId]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18968,7 +19029,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -18986,7 +19047,7 @@ new MTRDefaultSuccessCallbackBridge( 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); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19026,7 +19087,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19065,7 +19126,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19104,7 +19165,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19143,7 +19204,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19161,7 +19222,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19179,19 +19240,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestAccountLogin () -@property (readonly) chip::Controller::AccountLoginCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::AccountLoginCluster * cppCluster; @end @implementation MTRTestAccountLogin -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::AccountLoginCluster **)cppClusterSlot { return &_cppCluster; } @@ -19231,7 +19293,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19270,7 +19332,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19309,7 +19371,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19327,7 +19389,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19345,19 +19407,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestElectricalMeasurement () -@property (readonly) chip::Controller::ElectricalMeasurementCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::ElectricalMeasurementCluster * cppCluster; @end @implementation MTRTestElectricalMeasurement -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::ElectricalMeasurementCluster **)cppClusterSlot { return &_cppCluster; } @@ -19376,7 +19439,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19394,7 +19457,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19412,7 +19475,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19430,7 +19493,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19448,7 +19511,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19466,7 +19529,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19484,7 +19547,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19502,7 +19565,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19520,7 +19583,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19538,7 +19601,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19556,7 +19619,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19574,7 +19637,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19592,7 +19655,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19610,7 +19673,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19628,7 +19691,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19646,7 +19709,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19664,7 +19727,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19682,7 +19745,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19700,7 +19763,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19718,7 +19781,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19736,7 +19799,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.intValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19754,7 +19817,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.intValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19772,7 +19835,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19791,7 +19854,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19810,7 +19873,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19829,7 +19892,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19848,7 +19911,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19867,7 +19930,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19886,7 +19949,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19905,7 +19968,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19924,7 +19987,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19943,7 +20006,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19962,7 +20025,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -19981,7 +20044,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20000,7 +20063,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20019,7 +20082,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20037,7 +20100,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20055,7 +20118,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20073,7 +20136,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20092,7 +20155,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20111,7 +20174,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20129,7 +20192,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20148,7 +20211,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20167,7 +20230,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20186,7 +20249,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20204,7 +20267,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20222,7 +20285,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20240,7 +20303,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20258,7 +20321,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20276,7 +20339,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20294,7 +20357,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20312,7 +20375,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20330,7 +20393,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20348,7 +20411,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20366,7 +20429,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20384,7 +20447,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20402,7 +20465,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20420,7 +20483,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20438,7 +20501,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20456,7 +20519,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20474,7 +20537,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20492,7 +20555,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20510,7 +20573,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20528,7 +20591,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20546,7 +20609,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20564,7 +20627,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20582,7 +20645,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20600,7 +20663,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20619,7 +20682,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20638,7 +20701,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20657,7 +20720,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20676,7 +20739,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20695,7 +20758,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20714,7 +20777,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20732,7 +20795,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20750,7 +20813,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20768,7 +20831,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20786,7 +20849,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20805,7 +20868,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20823,7 +20886,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20841,7 +20904,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20859,7 +20922,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20877,7 +20940,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20895,7 +20958,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20913,7 +20976,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20931,7 +20994,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20949,7 +21012,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20967,7 +21030,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -20985,7 +21048,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21003,7 +21066,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21021,7 +21084,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21040,7 +21103,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21059,7 +21122,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21078,7 +21141,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21097,7 +21160,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21116,7 +21179,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21135,7 +21198,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21154,7 +21217,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21172,7 +21235,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21190,7 +21253,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21209,7 +21272,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21227,7 +21290,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21245,7 +21308,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21263,7 +21326,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21281,7 +21344,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21299,7 +21362,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21317,7 +21380,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21335,7 +21398,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21353,7 +21416,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21371,7 +21434,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21389,7 +21452,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21407,7 +21470,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21425,7 +21488,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21444,7 +21507,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21463,7 +21526,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21482,7 +21545,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21501,7 +21564,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21520,7 +21583,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21539,7 +21602,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21558,7 +21621,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21597,7 +21660,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21636,7 +21699,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21675,7 +21738,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21693,7 +21756,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21711,19 +21774,20 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @end @interface MTRTestTestCluster () -@property (readonly) chip::Controller::TestClusterCluster cppCluster; +// Must only touch cppCluster on the Matter queue. +@property (readonly) chip::Controller::TestClusterCluster * cppCluster; @end @implementation MTRTestTestCluster -- (chip::Controller::ClusterBase *)getCluster +- (chip::Controller::TestClusterCluster **)cppClusterSlot { return &_cppCluster; } @@ -21763,7 +21827,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21802,7 +21866,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21841,7 +21905,7 @@ new MTRDefaultSuccessCallbackBridge( } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21859,7 +21923,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -21877,7 +21941,7 @@ new MTRDefaultSuccessCallbackBridge( cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } diff --git a/zzz_generated/light-switch-app/zap-generated/CHIPClusters.h b/zzz_generated/light-switch-app/zap-generated/CHIPClusters.h index fd931c569dda71..8e1721e02a0647 100644 --- a/zzz_generated/light-switch-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/light-switch-app/zap-generated/CHIPClusters.h @@ -33,35 +33,46 @@ namespace Controller { class DLL_EXPORT IdentifyCluster : public ClusterBase { public: - IdentifyCluster() : ClusterBase(app::Clusters::Identify::Id) {} + IdentifyCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Identify::Id, endpoint) + {} ~IdentifyCluster() {} }; class DLL_EXPORT ScenesCluster : public ClusterBase { public: - ScenesCluster() : ClusterBase(app::Clusters::Scenes::Id) {} + ScenesCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Scenes::Id, endpoint) + {} ~ScenesCluster() {} }; class DLL_EXPORT OnOffCluster : public ClusterBase { public: - OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} + OnOffCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OnOff::Id, endpoint) + {} ~OnOffCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; class DLL_EXPORT ColorControlCluster : public ClusterBase { public: - ColorControlCluster() : ClusterBase(app::Clusters::ColorControl::Id) {} + ColorControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ColorControl::Id, endpoint) + {} ~ColorControlCluster() {} }; diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClusters.h b/zzz_generated/lighting-app/zap-generated/CHIPClusters.h index 15ec5aca34a215..fffb265ae9c797 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/lighting-app/zap-generated/CHIPClusters.h @@ -33,7 +33,10 @@ namespace Controller { class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/lock-app/zap-generated/CHIPClusters.h b/zzz_generated/lock-app/zap-generated/CHIPClusters.h index 15ec5aca34a215..fffb265ae9c797 100644 --- a/zzz_generated/lock-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/lock-app/zap-generated/CHIPClusters.h @@ -33,7 +33,10 @@ namespace Controller { class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/log-source-app/zap-generated/CHIPClusters.h b/zzz_generated/log-source-app/zap-generated/CHIPClusters.h index b64b056076a492..8baedc62f4c9d1 100644 --- a/zzz_generated/log-source-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/log-source-app/zap-generated/CHIPClusters.h @@ -33,7 +33,9 @@ namespace Controller { class DLL_EXPORT DiagnosticLogsCluster : public ClusterBase { public: - DiagnosticLogsCluster() : ClusterBase(app::Clusters::DiagnosticLogs::Id) {} + DiagnosticLogsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::DiagnosticLogs::Id, endpoint) + {} ~DiagnosticLogsCluster() {} }; diff --git a/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.h b/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.h index 9f5073338704b1..25e18123e9398d 100644 --- a/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.h @@ -33,7 +33,9 @@ namespace Controller { class DLL_EXPORT AccessControlCluster : public ClusterBase { public: - AccessControlCluster() : ClusterBase(app::Clusters::AccessControl::Id) {} + AccessControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::AccessControl::Id, endpoint) + {} ~AccessControlCluster() {} }; diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h index 15ec5aca34a215..fffb265ae9c797 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h @@ -33,7 +33,10 @@ namespace Controller { class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h index ca68fad85bc593..b1122aeaa10f55 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h @@ -33,84 +33,112 @@ namespace Controller { class DLL_EXPORT OnOffCluster : public ClusterBase { public: - OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} + OnOffCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OnOff::Id, endpoint) + {} ~OnOffCluster() {} }; class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase { public: - GeneralCommissioningCluster() : ClusterBase(app::Clusters::GeneralCommissioning::Id) {} + GeneralCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::GeneralCommissioning::Id, endpoint) + {} ~GeneralCommissioningCluster() {} }; class DLL_EXPORT SwitchCluster : public ClusterBase { public: - SwitchCluster() : ClusterBase(app::Clusters::Switch::Id) {} + SwitchCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Switch::Id, endpoint) + {} ~SwitchCluster() {} }; class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase { public: - OperationalCredentialsCluster() : ClusterBase(app::Clusters::OperationalCredentials::Id) {} + OperationalCredentialsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OperationalCredentials::Id, endpoint) + {} ~OperationalCredentialsCluster() {} }; class DLL_EXPORT ModeSelectCluster : public ClusterBase { public: - ModeSelectCluster() : ClusterBase(app::Clusters::ModeSelect::Id) {} + ModeSelectCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ModeSelect::Id, endpoint) + {} ~ModeSelectCluster() {} }; class DLL_EXPORT ThermostatUserInterfaceConfigurationCluster : public ClusterBase { public: - ThermostatUserInterfaceConfigurationCluster() : ClusterBase(app::Clusters::ThermostatUserInterfaceConfiguration::Id) {} + ThermostatUserInterfaceConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ThermostatUserInterfaceConfiguration::Id, endpoint) + {} ~ThermostatUserInterfaceConfigurationCluster() {} }; class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase { public: - TemperatureMeasurementCluster() : ClusterBase(app::Clusters::TemperatureMeasurement::Id) {} + TemperatureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TemperatureMeasurement::Id, endpoint) + {} ~TemperatureMeasurementCluster() {} }; class DLL_EXPORT RelativeHumidityMeasurementCluster : public ClusterBase { public: - RelativeHumidityMeasurementCluster() : ClusterBase(app::Clusters::RelativeHumidityMeasurement::Id) {} + RelativeHumidityMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::RelativeHumidityMeasurement::Id, endpoint) + {} ~RelativeHumidityMeasurementCluster() {} }; class DLL_EXPORT TargetNavigatorCluster : public ClusterBase { public: - TargetNavigatorCluster() : ClusterBase(app::Clusters::TargetNavigator::Id) {} + TargetNavigatorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TargetNavigator::Id, endpoint) + {} ~TargetNavigatorCluster() {} }; class DLL_EXPORT KeypadInputCluster : public ClusterBase { public: - KeypadInputCluster() : ClusterBase(app::Clusters::KeypadInput::Id) {} + KeypadInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::KeypadInput::Id, endpoint) + {} ~KeypadInputCluster() {} }; class DLL_EXPORT ContentLauncherCluster : public ClusterBase { public: - ContentLauncherCluster() : ClusterBase(app::Clusters::ContentLauncher::Id) {} + ContentLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ContentLauncher::Id, endpoint) + {} ~ContentLauncherCluster() {} }; class DLL_EXPORT ApplicationBasicCluster : public ClusterBase { public: - ApplicationBasicCluster() : ClusterBase(app::Clusters::ApplicationBasic::Id) {} + ApplicationBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ApplicationBasic::Id, endpoint) + {} ~ApplicationBasicCluster() {} }; diff --git a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h index ca68fad85bc593..b1122aeaa10f55 100644 --- a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h +++ b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h @@ -33,84 +33,112 @@ namespace Controller { class DLL_EXPORT OnOffCluster : public ClusterBase { public: - OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} + OnOffCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OnOff::Id, endpoint) + {} ~OnOffCluster() {} }; class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase { public: - GeneralCommissioningCluster() : ClusterBase(app::Clusters::GeneralCommissioning::Id) {} + GeneralCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::GeneralCommissioning::Id, endpoint) + {} ~GeneralCommissioningCluster() {} }; class DLL_EXPORT SwitchCluster : public ClusterBase { public: - SwitchCluster() : ClusterBase(app::Clusters::Switch::Id) {} + SwitchCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Switch::Id, endpoint) + {} ~SwitchCluster() {} }; class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase { public: - OperationalCredentialsCluster() : ClusterBase(app::Clusters::OperationalCredentials::Id) {} + OperationalCredentialsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OperationalCredentials::Id, endpoint) + {} ~OperationalCredentialsCluster() {} }; class DLL_EXPORT ModeSelectCluster : public ClusterBase { public: - ModeSelectCluster() : ClusterBase(app::Clusters::ModeSelect::Id) {} + ModeSelectCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ModeSelect::Id, endpoint) + {} ~ModeSelectCluster() {} }; class DLL_EXPORT ThermostatUserInterfaceConfigurationCluster : public ClusterBase { public: - ThermostatUserInterfaceConfigurationCluster() : ClusterBase(app::Clusters::ThermostatUserInterfaceConfiguration::Id) {} + ThermostatUserInterfaceConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ThermostatUserInterfaceConfiguration::Id, endpoint) + {} ~ThermostatUserInterfaceConfigurationCluster() {} }; class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase { public: - TemperatureMeasurementCluster() : ClusterBase(app::Clusters::TemperatureMeasurement::Id) {} + TemperatureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TemperatureMeasurement::Id, endpoint) + {} ~TemperatureMeasurementCluster() {} }; class DLL_EXPORT RelativeHumidityMeasurementCluster : public ClusterBase { public: - RelativeHumidityMeasurementCluster() : ClusterBase(app::Clusters::RelativeHumidityMeasurement::Id) {} + RelativeHumidityMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::RelativeHumidityMeasurement::Id, endpoint) + {} ~RelativeHumidityMeasurementCluster() {} }; class DLL_EXPORT TargetNavigatorCluster : public ClusterBase { public: - TargetNavigatorCluster() : ClusterBase(app::Clusters::TargetNavigator::Id) {} + TargetNavigatorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TargetNavigator::Id, endpoint) + {} ~TargetNavigatorCluster() {} }; class DLL_EXPORT KeypadInputCluster : public ClusterBase { public: - KeypadInputCluster() : ClusterBase(app::Clusters::KeypadInput::Id) {} + KeypadInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::KeypadInput::Id, endpoint) + {} ~KeypadInputCluster() {} }; class DLL_EXPORT ContentLauncherCluster : public ClusterBase { public: - ContentLauncherCluster() : ClusterBase(app::Clusters::ContentLauncher::Id) {} + ContentLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ContentLauncher::Id, endpoint) + {} ~ContentLauncherCluster() {} }; class DLL_EXPORT ApplicationBasicCluster : public ClusterBase { public: - ApplicationBasicCluster() : ClusterBase(app::Clusters::ApplicationBasic::Id) {} + ApplicationBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ApplicationBasic::Id, endpoint) + {} ~ApplicationBasicCluster() {} }; diff --git a/zzz_generated/pump-app/zap-generated/CHIPClusters.h b/zzz_generated/pump-app/zap-generated/CHIPClusters.h index 14ebe4216c29ba..bb8a771936d172 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/pump-app/zap-generated/CHIPClusters.h @@ -33,14 +33,19 @@ namespace Controller { class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; class DLL_EXPORT OccupancySensingCluster : public ClusterBase { public: - OccupancySensingCluster() : ClusterBase(app::Clusters::OccupancySensing::Id) {} + OccupancySensingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OccupancySensing::Id, endpoint) + {} ~OccupancySensingCluster() {} }; diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h index 02f8f3597247c8..c632a1a5c9d7a4 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h @@ -33,42 +33,57 @@ namespace Controller { class DLL_EXPORT OnOffCluster : public ClusterBase { public: - OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} + OnOffCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OnOff::Id, endpoint) + {} ~OnOffCluster() {} }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} }; class DLL_EXPORT PumpConfigurationAndControlCluster : public ClusterBase { public: - PumpConfigurationAndControlCluster() : ClusterBase(app::Clusters::PumpConfigurationAndControl::Id) {} + PumpConfigurationAndControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::PumpConfigurationAndControl::Id, endpoint) + {} ~PumpConfigurationAndControlCluster() {} }; class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase { public: - TemperatureMeasurementCluster() : ClusterBase(app::Clusters::TemperatureMeasurement::Id) {} + TemperatureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TemperatureMeasurement::Id, endpoint) + {} ~TemperatureMeasurementCluster() {} }; class DLL_EXPORT PressureMeasurementCluster : public ClusterBase { public: - PressureMeasurementCluster() : ClusterBase(app::Clusters::PressureMeasurement::Id) {} + PressureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::PressureMeasurement::Id, endpoint) + {} ~PressureMeasurementCluster() {} }; class DLL_EXPORT FlowMeasurementCluster : public ClusterBase { public: - FlowMeasurementCluster() : ClusterBase(app::Clusters::FlowMeasurement::Id) {} + FlowMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::FlowMeasurement::Id, endpoint) + {} ~FlowMeasurementCluster() {} }; diff --git a/zzz_generated/thermostat/zap-generated/CHIPClusters.h b/zzz_generated/thermostat/zap-generated/CHIPClusters.h index 720e7b79d6c033..e91d09cd512a65 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClusters.h +++ b/zzz_generated/thermostat/zap-generated/CHIPClusters.h @@ -33,7 +33,9 @@ namespace Controller { class DLL_EXPORT IdentifyCluster : public ClusterBase { public: - IdentifyCluster() : ClusterBase(app::Clusters::Identify::Id) {} + IdentifyCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Identify::Id, endpoint) + {} ~IdentifyCluster() {} }; diff --git a/zzz_generated/tv-app/zap-generated/CHIPClusters.h b/zzz_generated/tv-app/zap-generated/CHIPClusters.h index 3c1e36bb52eeb8..0141e3eed1422c 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/tv-app/zap-generated/CHIPClusters.h @@ -33,28 +33,37 @@ namespace Controller { class DLL_EXPORT BindingCluster : public ClusterBase { public: - BindingCluster() : ClusterBase(app::Clusters::Binding::Id) {} + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) + {} ~BindingCluster() {} }; class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase { public: - GeneralCommissioningCluster() : ClusterBase(app::Clusters::GeneralCommissioning::Id) {} + GeneralCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::GeneralCommissioning::Id, endpoint) + {} ~GeneralCommissioningCluster() {} }; class DLL_EXPORT NetworkCommissioningCluster : public ClusterBase { public: - NetworkCommissioningCluster() : ClusterBase(app::Clusters::NetworkCommissioning::Id) {} + NetworkCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::NetworkCommissioning::Id, endpoint) + {} ~NetworkCommissioningCluster() {} }; class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase { public: - OperationalCredentialsCluster() : ClusterBase(app::Clusters::OperationalCredentials::Id) {} + OperationalCredentialsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OperationalCredentials::Id, endpoint) + {} ~OperationalCredentialsCluster() {} }; diff --git a/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h b/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h index bd719d0936c76e..33c0da66b41c05 100644 --- a/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h @@ -33,91 +33,117 @@ namespace Controller { class DLL_EXPORT OnOffCluster : public ClusterBase { public: - OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} + OnOffCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OnOff::Id, endpoint) + {} ~OnOffCluster() {} }; class DLL_EXPORT LevelControlCluster : public ClusterBase { public: - LevelControlCluster() : ClusterBase(app::Clusters::LevelControl::Id) {} + LevelControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::LevelControl::Id, endpoint) + {} ~LevelControlCluster() {} }; class DLL_EXPORT DescriptorCluster : public ClusterBase { public: - DescriptorCluster() : ClusterBase(app::Clusters::Descriptor::Id) {} + DescriptorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Descriptor::Id, endpoint) + {} ~DescriptorCluster() {} }; class DLL_EXPORT ChannelCluster : public ClusterBase { public: - ChannelCluster() : ClusterBase(app::Clusters::Channel::Id) {} + ChannelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::Channel::Id, endpoint) + {} ~ChannelCluster() {} }; class DLL_EXPORT TargetNavigatorCluster : public ClusterBase { public: - TargetNavigatorCluster() : ClusterBase(app::Clusters::TargetNavigator::Id) {} + TargetNavigatorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::TargetNavigator::Id, endpoint) + {} ~TargetNavigatorCluster() {} }; class DLL_EXPORT MediaPlaybackCluster : public ClusterBase { public: - MediaPlaybackCluster() : ClusterBase(app::Clusters::MediaPlayback::Id) {} + MediaPlaybackCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::MediaPlayback::Id, endpoint) + {} ~MediaPlaybackCluster() {} }; class DLL_EXPORT MediaInputCluster : public ClusterBase { public: - MediaInputCluster() : ClusterBase(app::Clusters::MediaInput::Id) {} + MediaInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::MediaInput::Id, endpoint) + {} ~MediaInputCluster() {} }; class DLL_EXPORT KeypadInputCluster : public ClusterBase { public: - KeypadInputCluster() : ClusterBase(app::Clusters::KeypadInput::Id) {} + KeypadInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::KeypadInput::Id, endpoint) + {} ~KeypadInputCluster() {} }; class DLL_EXPORT ContentLauncherCluster : public ClusterBase { public: - ContentLauncherCluster() : ClusterBase(app::Clusters::ContentLauncher::Id) {} + ContentLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ContentLauncher::Id, endpoint) + {} ~ContentLauncherCluster() {} }; class DLL_EXPORT AudioOutputCluster : public ClusterBase { public: - AudioOutputCluster() : ClusterBase(app::Clusters::AudioOutput::Id) {} + AudioOutputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::AudioOutput::Id, endpoint) + {} ~AudioOutputCluster() {} }; class DLL_EXPORT ApplicationLauncherCluster : public ClusterBase { public: - ApplicationLauncherCluster() : ClusterBase(app::Clusters::ApplicationLauncher::Id) {} + ApplicationLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ApplicationLauncher::Id, endpoint) + {} ~ApplicationLauncherCluster() {} }; class DLL_EXPORT ApplicationBasicCluster : public ClusterBase { public: - ApplicationBasicCluster() : ClusterBase(app::Clusters::ApplicationBasic::Id) {} + ApplicationBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::ApplicationBasic::Id, endpoint) + {} ~ApplicationBasicCluster() {} }; class DLL_EXPORT AccountLoginCluster : public ClusterBase { public: - AccountLoginCluster() : ClusterBase(app::Clusters::AccountLogin::Id) {} + AccountLoginCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::AccountLogin::Id, endpoint) + {} ~AccountLoginCluster() {} }; diff --git a/zzz_generated/window-app/zap-generated/CHIPClusters.h b/zzz_generated/window-app/zap-generated/CHIPClusters.h index 15ec5aca34a215..fffb265ae9c797 100644 --- a/zzz_generated/window-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/window-app/zap-generated/CHIPClusters.h @@ -33,7 +33,10 @@ namespace Controller { class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: - OtaSoftwareUpdateProviderCluster() : ClusterBase(app::Clusters::OtaSoftwareUpdateProvider::Id) {} + OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, + EndpointId endpoint) : + ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint) + {} ~OtaSoftwareUpdateProviderCluster() {} };